A base class for HTTP errors.

Hierarchy

Constructors

  • Creates an instance of HttpError.

    Parameters

    • statusCode: number

      The HTTP status code for the error.

    • Optional message: string

      The error message.

      Optional

    Returns HttpError

Properties

message: string
name: string
stack?: string
statusCode: number

The HTTP status code for the error.

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

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function
      Optional

    Returns void

Generated using TypeDoc