Class ResponseError

Error thrown when the API returns an error response that can't be parsed to a more specific Error instance.

Hierarchy

  • Error
    • ResponseError

Constructors

  • Parameters

    • statusCode: number
    • body: string
    • headers: Headers
    • Optional msg: string

    Returns ResponseError

Properties

body: string
headers: Headers
message: string
name: "ResponseError" = ...
stack?: string
statusCode: number
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void