Class: ResponseError
Hierarchy
-
Error
↳
ResponseError
Constructors
constructor
• new ResponseError(message
, data?
): ResponseError
Create a new ResponseError.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
message |
string |
undefined |
Human readable error description |
data |
any |
undefined |
Additional data object for logging useful debug information |
Returns
Overrides
Error.constructor
Properties
cause
• Optional
cause: unknown
Inherited from
Error.cause
data
• Readonly
data: any
message
• message: string
Inherited from
Error.message
name
• name: string
Inherited from
Error.name
stack
• Optional
stack: string
Inherited from
Error.stack
prepareStackTrace
▪ Static
Optional
prepareStackTrace: (err
: Error
, stackTraces
: CallSite
[]) => any
Optional override for formatting stack traces
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Type declaration
▸ (err
, stackTraces
): any
Parameters
Name | Type |
---|---|
err |
Error |
stackTraces |
CallSite [] |
Returns
any
Inherited from
Error.prepareStackTrace
stackTraceLimit
▪ Static
stackTraceLimit: number
Inherited from
Error.stackTraceLimit
Methods
info
▸ info(): null
| string
Format the additional data object into human readable form.
Returns
null
| string
captureStackTrace
▸ captureStackTrace(targetObject
, constructorOpt?
): void
Create .stack property on a target object
Parameters
Name | Type |
---|---|
targetObject |
object |
constructorOpt? |
Function |
Returns
void
Inherited from
Error.captureStackTrace