A wrapped error for a fetch response.

Hierarchy

Constructors

  • Create a new response error.

    Parameters

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

    Returns ResponseError

Properties

message: string
name: string
response: Response

The response associated with the error.

stack?: string
traceback: string

The traceback associated with the error.

_defaultMessage: any
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

  • 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