Skip to main content

Class: NetworkError

Thrown when a transport-level failure occurs before a response is received — a DNS failure, a refused/reset connection, or an otherwise failed fetch. Has no HTTP status because no response was produced.

Extends

Constructors

Constructor

new NetworkError(message, details?): NetworkError

Parameters

Returns

NetworkError

Overrides

Terminal49Error.constructor

Properties

Methods

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}. The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace. The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

Parameters

Returns

void

Inherited from

Terminal49Error.captureStackTrace

prepareStackTrace()

static prepareStackTrace(err, stackTraces): any

Parameters

Returns

any

See

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

Inherited from

Terminal49Error.prepareStackTrace