Docs

Class: UnprocessableEntityError

Class: UnprocessableEntityError

HTTP 422: request validation failed.

Extends

Constructors

Constructor

new UnprocessableEntityError(
   status,
   body,
   headers,
   message?
): UnprocessableEntityError;

Parameters

status

number

body

unknown

headers

Headers

message?

string

Returns

UnprocessableEntityError

Inherited from

APIError.constructor

Properties

body

readonly body: unknown;

Parsed JSON, response text, or undefined for an empty body.

Inherited from

APIError.body


headers

readonly headers: Headers;

HTTP response headers.

Inherited from

APIError.headers


requestId

readonly requestId: string | undefined;

Request ID from x-typesafe-request-id, or undefined when absent.

Inherited from

APIError.requestId


status

readonly status: number;

HTTP response status code.

Inherited from

APIError.status

Methods

fromResponse()

static fromResponse(
   status,
   body,
   headers
): APIError;

Create the error subclass for an HTTP status code.

Parameters

status

number

body

unknown

headers

Headers

Returns

APIError

Inherited from

APIError.fromResponse