Skip to content

errorFromResponse

errorFromResponse(response): Promise<MantleClientError>

Defined in: errors.ts:50

Deserialize a non-2xx Response into a MantleClientError. Falls back to the HTTP status alone when the body is not Mantle’s error JSON (e.g. a gateway error page).

Response

Promise<MantleClientError>