Class: APIError¶
An unsuccessful HTTP response from the API.
Extends¶
Extended by¶
AuthenticationErrorBadRequestErrorInternalServerErrorNotFoundErrorPermissionDeniedErrorRateLimitErrorUnprocessableEntityError
Constructors¶
Constructor¶
Parameters¶
status¶
number
body¶
unknown
headers¶
Headers
message?¶
string
Returns¶
APIError
Overrides¶
Properties¶
body¶
Parsed JSON, response text, or undefined for an empty body.
headers¶
HTTP response headers.
requestId¶
Request ID from x-typesafe-request-id, or undefined when absent.
status¶
HTTP response status code.
Methods¶
fromResponse()¶
Create the error subclass for an HTTP status code.
Parameters¶
status¶
number
body¶
unknown
headers¶
Headers
Returns¶
APIError