Fix API error details and add toast info

This commit is contained in:
MartinBraquet
2026-03-15 14:31:42 +01:00
parent 3d1e91d100
commit f83dbf349e
2 changed files with 8 additions and 5 deletions

View File

@@ -50,7 +50,7 @@ export async function typedAPICall<P extends APIPath>(
}
if (!resp.ok) {
throw new APIError(resp.status as any, json?.message, json?.details)
throw new APIError(resp.status as any, json?.error?.message, json?.error?.details)
}
return json
}) as APIResponse<P>