Skip to main content

Class: ClientError

Class to represent errors from Client.

Hierarchy

  • Error

    ClientError

Table of contents

Methods

Properties

Constructors

Methods

captureStackTrace

Static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

NameType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

Error.captureStackTrace

Properties

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


route

route: string

The route the request was made to.


httpStatus

httpStatus: number

The HTTP status code returned.


code

Optional code: string

The code return in the payload.

Constructors

constructor

new ClientError(message, route, httpStatus, code?)

Create a new instance of ClientError.

Parameters

NameTypeDescription
messagestringThe message for the error.
routestringThe route the request was made to.
httpStatusnumberThe http status code.
code?stringThe code in the payload.

Overrides

Error.constructor