Skip to main content

Class: NodeRequestError

Extends

  • Error

Constructors

new NodeRequestError()

new NodeRequestError(status, message, request, response?, cause?, data?): NodeRequestError

Parameters

status: number

message: string

request: Request

response?: Response

cause?: ErrnoException

data?: ServerError

Returns

NodeRequestError

Overrides

Error.constructor

Properties

cause?

optional cause: ErrnoException


data?

optional data: ServerError


message

message: string

Inherited from

Error.message


name

name: string

Inherited from

Error.name


request

request: Request


response?

optional response: Response


stack?

optional stack: string

Inherited from

Error.stack


status

status: number


prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any

Optional override for formatting stack traces

Parameters

err: Error

stackTraces: CallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

Error.prepareStackTrace


stackTraceLimit

static stackTraceLimit: number

Inherited from

Error.stackTraceLimit

Methods

toString()

toString(): string

Returns a string representation of an object.

Returns

string


captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

targetObject: object

constructorOpt?: Function

Returns

void

Inherited from

Error.captureStackTrace