Skip to content

Overview / HttpError

HttpError

Extends

  • Error

Constructors

new HttpError()

new HttpError(message, status, cause, data): HttpError

Parameters

ParameterTypeDefault value
messagestringundefined
statusnumberundefined
causestringundefined
dataanyundefined

Returns

HttpError

Overrides

Error.constructor

Properties

PropertyModifierTypeDefault valueInherited from
causepublicstringundefinedError.cause
datapublicanyundefined-
messagepublicstringundefinedError.message
statuspublicnumberundefined-

Methods

BadGateway()

static BadGateway(message, data?): HttpError

Parameters

ParameterType
messagestring
data?any

Returns

HttpError


BadRequest()

static BadRequest(message, data?): HttpError

Parameters

ParameterType
messagestring
data?any

Returns

HttpError


Conflict()

static Conflict(message, data?): HttpError

Parameters

ParameterType
messagestring
data?any

Returns

HttpError


Forbidden()

static Forbidden(message, data?): HttpError

Parameters

ParameterType
messagestring
data?any

Returns

HttpError


GatewayTimeout()

static GatewayTimeout(message, data?): HttpError

Parameters

ParameterType
messagestring
data?any

Returns

HttpError


IAmATeapot()

static IAmATeapot(message, data?): HttpError

Parameters

ParameterType
messagestring
data?any

Returns

HttpError


InternalServer()

static InternalServer(message, data?): HttpError

Parameters

ParameterType
messagestring
data?any

Returns

HttpError


MethodNotAllowed()

static MethodNotAllowed(message, data?): HttpError

Parameters

ParameterType
messagestring
data?any

Returns

HttpError


NotFound()

static NotFound(message, data?): HttpError

Parameters

ParameterType
messagestring
data?any

Returns

HttpError


NotImplemented()

static NotImplemented(message, data?): HttpError

Parameters

ParameterType
messagestring
data?any

Returns

HttpError


PaymentRequired()

static PaymentRequired(message, data?): HttpError

Parameters

ParameterType
messagestring
data?any

Returns

HttpError


ServiceUnavailable()

static ServiceUnavailable(message, data?): HttpError

Parameters

ParameterType
messagestring
data?any

Returns

HttpError


TooManyRequests()

static TooManyRequests(message, data?): HttpError

Parameters

ParameterType
messagestring
data?any

Returns

HttpError


Unauthorized()

static Unauthorized(message, data?): HttpError

Parameters

ParameterType
messagestring
data?any

Returns

HttpError


UnsupportedMediaType()

static UnsupportedMediaType(message, data?): HttpError

Parameters

ParameterType
messagestring
data?any

Returns

HttpError

Released under the GPL-3.0 License.