Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

NatsError

import { NatsError } from "https://raw.githubusercontent.com/nats-io/nats.deno/v1.27.0/nats-base-client/internal_mod.ts";
class NatsError extends Error {
constructor(
message: string,
code: string,
chainedError?: Error,
);
api_error?: ApiError;
chainedError?: Error;
code: string;
message: string;
name: string;
permissionContext?: {
operation: string;
subject: string;
queue?: string;
}
;
 
isAuthError(): boolean;
isAuthTimeout(): boolean;
isJetStreamError(): boolean;
isPermissionError(): boolean;
isProtocolError(): boolean;
jsError(): ApiError | null;
 
static errorForCode(code: string, chainedError?: Error): NatsError;
}

§Extends

§
Error
[src]

§Constructors

§
new NatsError(message: string, code: string, chainedError?: Error)
[src]
@param message
@param code

§Properties

§
api_error: ApiError
[src]
§
chainedError: Error
[src]
§
code: string
[src]
§
message: string
[src]
§
name: string
[src]
§
permissionContext: {
operation: string;
subject: string;
queue?: string;
}
[src]

§Methods

§
isAuthError(): boolean
[src]
§
isAuthTimeout(): boolean
[src]
§
isJetStreamError(): boolean
[src]
§
isPermissionError(): boolean
[src]
§
isProtocolError(): boolean
[src]
§
jsError(): ApiError | null
[src]

§Static Methods

§
errorForCode(code: string, chainedError?: Error): NatsError
[src]