From e83ec6506cb14e8b7b08c2f9b498ac1876556f1f Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Thu, 19 Mar 2026 17:16:02 +0100 Subject: [PATCH] Fix API error handling to correctly parse error details --- common/src/util/api.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/util/api.ts b/common/src/util/api.ts index 441148a5..c5484ff7 100644 --- a/common/src/util/api.ts +++ b/common/src/util/api.ts @@ -50,7 +50,8 @@ export async function typedAPICall

( } if (!resp.ok) { - throw new APIError(resp.status as any, json?.error?.message, json?.error?.details) + json = json?.error ?? json + throw new APIError(resp.status as any, json?.message, json?.details) } return json }) as APIResponse