StatusCodeError class

Extends Error to provide specialized error messages.

Extends

Error

Constructors

StatusCodeError(StatusCodes, string)

Creates a new instance of the StatusCodeError class.

Properties

Error
statusCode

Inherited Properties

message
name
stack

Constructor Details

StatusCodeError(StatusCodes, string)

Creates a new instance of the StatusCodeError class.

new StatusCodeError(statusCode: StatusCodes, message?: string)

Parameters

statusCode

StatusCodes

The status code.

message

string

Optional. The error message.

Property Details

Error

static Error: ErrorConstructor

Property Value

ErrorConstructor

statusCode

statusCode: StatusCodes

Property Value

StatusCodes

Inherited Property Details

message

message: string

Property Value

string

Inherited From Error.message

name

name: string

Property Value

string

Inherited From Error.name

stack

stack?: string

Property Value

string

Inherited From Error.stack