WIP 1.51.12: tickets, scan locks, attendance, allocations on v2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ls1vMdg2GYqbnKZmPaX1ot
This commit is contained in:
@@ -205,7 +205,7 @@ export async function fetchApiFile(apiBase: string, authToken: string, path: str
|
||||
if (!res.ok) {
|
||||
const text = await res.text().catch(() => '');
|
||||
let message = text;
|
||||
try { message = JSON.parse(text)?.message || text; } catch { /* not JSON */ }
|
||||
try { const j = JSON.parse(text); message = j?.error?.message || j?.message || text; } catch { /* not JSON */ }
|
||||
throw new Error(message || `Download failed (${res.status})`);
|
||||
}
|
||||
return res.blob();
|
||||
|
||||
Reference in New Issue
Block a user