Options
All
  • Public
  • Public/Protected
  • All
Menu

A wrapped error for a fetch response.

Hierarchy

  • Error
    • ResponseError

Index

Constructors

constructor

  • new ResponseError(response: Response, message?: string, traceback?: string): ResponseError
  • Create a new response error.

    Parameters

    • response: Response
    • Optional message: string
    • Optional traceback: string

    Returns ResponseError

Properties

message

message: string

name

name: string

response

response: Response

The response associated with the error.

Optional stack

stack: string

traceback

traceback: string

The traceback associated with the error.

Static Optional prepareStackTrace

prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any

Type declaration

    • (err: Error, stackTraces: CallSite[]): any
    • Optional override for formatting stack traces

      Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

Static stackTraceLimit

stackTraceLimit: number

Methods

Static captureStackTrace

  • captureStackTrace(targetObject: object, constructorOpt?: Function): void
  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Static create

  • Create a ResponseError from a response, handling the traceback and message as appropriate.

    Parameters

    • response: Response

      The response object.

    Returns Promise<ResponseError>

    A promise that resolves with a ResponseError object.

Generated using TypeDoc