Class: BadRequestError
Class: BadRequestError
HTTP 400: the request is invalid.
Extends
Constructors
Constructor
new BadRequestError(
status,
body,
headers,
message?
): BadRequestError;
Parameters
status
number
body
unknown
headers
Headers
message?
string
Returns
BadRequestError
Inherited from
Properties
body
readonly body: unknown;
Parsed JSON, response text, or undefined for an empty body.
Inherited from
headers
readonly headers: Headers;
HTTP response headers.
Inherited from
requestId
readonly requestId: string | undefined;
Request ID from x-typesafe-request-id, or undefined when absent.
Inherited from
status
readonly status: number;
HTTP response status code.
Inherited from
Methods
fromResponse()
static fromResponse(
status,
body,
headers
): APIError;
Create the error subclass for an HTTP status code.
Parameters
status
number
body
unknown
headers
Headers