NatsError
@wuespace/telestion / nats / NatsError
Extends¶
Constructors¶
new NatsError(message, code, chainedError)¶
new NatsError(
message
,code
,chainedError
?):NatsError
Parameters¶
• message: string
• code: string
• chainedError?: Error
Returns¶
Overrides¶
Error.constructor
Api¶
private
Properties¶
api_error?¶
api_error?:
ApiError
chainedError?¶
chainedError?:
Error
code¶
code:
string
message¶
message:
string
Overrides¶
Error.message
name¶
name:
string
Overrides¶
Error.name
permissionContext?¶
permissionContext?:
Object
Type declaration¶
operation¶
operation:
string
subject¶
subject:
string
stack?¶
stack?:
string
Inherited from¶
Error.stack
prepareStackTrace?¶
static
prepareStackTrace?: (err
,stackTraces
) =>any
Optional override for formatting stack traces
Parameters¶
• err: Error
• stackTraces: CallSite
[]
Returns¶
any
See¶
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from¶
Error.prepareStackTrace
stackTraceLimit¶
static
stackTraceLimit:number
Inherited from¶
Error.stackTraceLimit
Methods¶
isAuthError()¶
isAuthError():
boolean
Returns¶
boolean
isAuthTimeout()¶
isAuthTimeout():
boolean
Returns¶
boolean
isJetStreamError()¶
isJetStreamError():
boolean
Returns¶
boolean
isPermissionError()¶
isPermissionError():
boolean
Returns¶
boolean
isProtocolError()¶
isProtocolError():
boolean
Returns¶
boolean
jsError()¶
jsError():
null
|ApiError
Returns¶
null
| ApiError
captureStackTrace()¶
static
captureStackTrace(targetObject
,constructorOpt
?):void
Create .stack property on a target object
Parameters¶
• targetObject: object
• constructorOpt?: Function
Returns¶
void
Inherited from¶
Error.captureStackTrace
errorForCode()¶
static
errorForCode(code
,chainedError
?):NatsError
Parameters¶
• code: string
• chainedError?: Error