Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
class NatsError
extends Error
import { NatsError } from "https://deno.land/x/natsws@v1.29.2/src/nats-base-client.ts";

Constructors

new
NatsError(
message: string,
code: string,
chainedError?: Error,
)

Properties

optional
api_error: ApiError
optional
chainedError: Error
code: string
message: string
name: string
optional
permissionContext: { operation: string; subject: string; queue?: string; }

Methods

isAuthError(): boolean
isAuthTimeout(): boolean
isJetStreamError(): boolean
isProtocolError(): boolean
jsError(): ApiError | null

Static Methods

errorForCode(code: string, chainedError?: Error): NatsError