Skip to content

Class: StatusCodeError

An error that will be thrown by Fetcher.fetch when the fetcher response has an HTTP status code of 400 or greater.

This class largely models the StatusCodeError from the (now deprecated) request-promise library, which has a quirky structure.

Hierarchy

  • Error

StatusCodeError

Properties

body

body: any

The parsed body of the HTTP response.

Defined in

api.ts:113


error

error: any

Alias for body.

Defined in

api.ts:117


name

name: string = 'StatusCodeError'

The name of the error, for identiciation purposes.

Overrides

Error.name

Defined in

api.ts:105


options

options: FetchRequest

The original fetcher request used to make this HTTP request.

Defined in

api.ts:121


response

response: StatusCodeErrorResponse

The raw HTTP response, including headers.

Defined in

api.ts:125


statusCode

statusCode: number

The HTTP status code, e.g. 404.

Defined in

api.ts:109