Function: createApiError()
ts
function createApiError(
message,
status,
statusText,
body,
headers?,
options?): ApiError;Defined in: src/core/errors/fromResponse.ts:102
Build the error class that matches the status, so callers can branch on the type instead of the number.
Parameters
| Parameter | Type |
|---|---|
message | string |
status | number |
statusText | string |
body | unknown |
headers? | Headers |
options? | ApiErrorOptions |