You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removed ServiceResponseError export. ServiceError now covers all response error paths.
ServiceError constructor signature changed from (message, response) to (message, code, response).
What's new
ServiceError.fromResponse(response, body) reconstructs a ServiceError from a raw fetch result, unpacking structured {code?, message, details?} bodies and falling back to response.statusText otherwise.
client.json() now sends Accept: application/json by default (overridable via runtime headers).
All thrown errors carry the originating Response on .response.
Migration
Replace catch (e) { if (e instanceof ServiceResponseError) ... } with a single instanceof ServiceError check.
If you constructed ServiceError directly: insert the status code as the second argument.