Skip to main content

Class: QueryError

fetch/src.QueryError

The QueryError class which is thrown by the fetch method

Hierarchy

Constructors

constructor

new QueryError(url, code, response, body)

Parameters

NameType
urlstring
codenumber
responseResponse
bodystring

Overrides

Error.constructor

Defined in

projects/utilities/packages/fetch/src/lib/QueryError.ts:19

Properties

#json

Private #json: unknown

Defined in

projects/utilities/packages/fetch/src/lib/QueryError.ts:17


body

Readonly body: string

The returned response body as a string

Defined in

projects/utilities/packages/fetch/src/lib/QueryError.ts:13


cause

Optional cause: Error

Inherited from

Error.cause

Defined in

node_modules/typescript/lib/lib.es2022.error.d.ts:26


code

Readonly code: number

The HTTP status code.

Defined in

projects/utilities/packages/fetch/src/lib/QueryError.ts:11


message

message: string

Inherited from

Error.message

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1023


name

name: string

Inherited from

Error.name

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1022


response

Readonly response: Response

The original {@link Response} object

Defined in

projects/utilities/packages/fetch/src/lib/QueryError.ts:15


stack

Optional stack: string

Inherited from

Error.stack

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1024


url

Readonly url: string

The requested url.

Defined in

projects/utilities/packages/fetch/src/lib/QueryError.ts:9


prepareStackTrace

Static Optional prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any

Type declaration

▸ (err, stackTraces): any

Optional override for formatting stack traces

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

Parameters
NameType
errError
stackTracesCallSite[]
Returns

any

Inherited from

Error.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:11


stackTraceLimit

Static stackTraceLimit: number

Inherited from

Error.stackTraceLimit

Defined in

node_modules/@types/node/globals.d.ts:13

Methods

toJSON

toJSON(): any

Returns

any

Defined in

projects/utilities/packages/fetch/src/lib/QueryError.ts:28


captureStackTrace

Static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

NameType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

Error.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:4