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
Name | Type |
---|---|
targetObject | object |
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
Name | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
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
Name | Type | Description |
---|---|---|
message | string | The message for the error. |
route | string | The route the request was made to. |
httpStatus | number | The http status code. |
code? | string | The code in the payload. |
Overrides
Error.constructor