HTTPError class This class is used to represent an HTTP error.

throw new HTTPError(404, 'Not Found');

Hierarchy

  • Error
    • HTTPError

Constructors

Properties

Constructors

  • Constructor for HTTPError

    Parameters

    • status: number

      The HTTP status code

    • statusText: string

      The HTTP status text

    Returns HTTPError

Properties

name: string = 'HTTPError'

The name of the error(HTTPError)

status: number

The HTTP status code

statusText: string

The HTTP status text