From d332c43a9fcbcff93f659f8f2ae5ec809393314c Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Sun, 13 Sep 2026 12:13:35 +0100 Subject: [PATCH] fix(maestro): handle 202 as no-body response in jsonOrError The daemon returns 202 Accepted when a structured prompt is queued. jsonOrError only skipped res.json() for 204, so the empty 202 body caused a JSON parse error. Co-Authored-By: Claude Opus 4.6 --- web/src/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/api.ts b/web/src/api.ts index 2174b54..5e18a82 100644 --- a/web/src/api.ts +++ b/web/src/api.ts @@ -39,7 +39,7 @@ export class ApiRequestError extends Error { async function jsonOrError(res: Response): Promise { if (res.ok) { - if (res.status === 204) return undefined as unknown as T; + if (res.status === 204 || res.status === 202) return undefined as unknown as T; return (await res.json()) as T; } try {