다음을 통해 공유


HttpError class

Error thrown when an HTTP request fails.

Extends

Error

Constructors

HttpError(string, number)

Constructs a new instance of HttpError.

Properties

Error
message
name
stack
statusCode

The HTTP status code represented by this error.

Constructor Details

HttpError(string, number)

Constructs a new instance of HttpError.

new HttpError(errorMessage: string, statusCode: number)

Parameters

errorMessage

string

A descriptive error message.

statusCode

number

The HTTP status code represented by this error.

Property Details

Error

static Error: ErrorConstructor

Property Value

ErrorConstructor

message

message: string

Property Value

string

name

name: string

Property Value

string

stack

stack?: string

Property Value

string

statusCode

The HTTP status code represented by this error.

public statusCode: number

Property Value

number