Skip to content

Commit b6f217c

Browse files
committed
test(studio): narrow the verdict double's refused errors
Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
1 parent e428611 commit b6f217c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎ui/packages/app-shell/src/views/studio-design/DataPillar.validationVerdictHold-27644.test.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ const mockClient: Record<string, unknown> = {
7575
// objectstack#36511 — the Save's own publish: the door refuses the guard, and
7676
// the draft it judged stays pending; an accepted one goes live.
7777
publish: vi.fn(async () => {
78-
const verdict = server.draft ? verdictOf(server.draft) : { valid: true as const };
79-
if ('errors' in verdict) {
80-
const issues = verdict.errors.map((e) => ({ ...e, path: `objects.showcase_task.${e.path}` }));
78+
const errors = server.draft ? verdictOf(server.draft).errors : undefined;
79+
if (errors) {
80+
const issues = errors.map((e) => ({ ...e, path: `objects.showcase_task.${e.path}` }));
8181
throw Object.assign(new Error(REFUSAL), { status: 422, code: 'VALIDATION_FAILED', issues });
8282
}
8383
server.draft = null;

0 commit comments

Comments
 (0)