Error class that automatically sets this.name to this.constructor.name.

Hierarchy

Constructors

  • new HTTPError(code: number, message: string, apimessage?: string): HTTPError
  • Parameters

    • code: number

      Status code

    • message: string

      Status message

    • Optional apimessage: string

      The API message that came with the error

    Returns HTTPError

Properties

code: number

HTTP status code

defMessage: string

The default status message this got

message: string
name: string

Name of the constructor

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

Type declaration

stackTraceLimit: number

Methods

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

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc