Error class for errors that associated with unsuccessful HTTP responses. It's throw by API category REST API handlers and GraphQL query handlers for now.

Hierarchy (view full)

Constructors

Properties

message: string
name: string
recoverySuggestion?: string
stack?: string
underlyingError?: unknown
prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

Type declaration

stackTraceLimit: number

Accessors

  • get response(): undefined | ApiErrorResponse
  • The unwrapped HTTP response causing the given API error.

    Returns undefined | ApiErrorResponse

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: Object
    • Optional constructorOpt: Function

    Returns void