mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-26 10:31:10 -04:00
Fix API error details and add toast info
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user