diff --git a/apps/arc-web/app/api-client.ts b/apps/arc-web/app/api-client.ts index 92a469f4a..30d920b2b 100644 --- a/apps/arc-web/app/api-client.ts +++ b/apps/arc-web/app/api-client.ts @@ -51,6 +51,6 @@ export async function apiFetch( */ export async function apiJson(path: string, init?: RequestInit): Promise { const res = await apiFetch(path, init); - if (!res.ok) throw new Error(`API ${res.status}: ${await res.text()}`); + if (!res.ok) throw new Response(await res.text(), { status: res.status }); return res.json() as Promise; }