class JetStreamUnavailableError
extends Error
Since 0.5.0

Thrown by NatsBroker.connect when the NATS server rejects the JetStream manager probe — the server does not have JetStream enabled, which the nats broker requires. The platform's own error (typically the raw 503 / NO_RESPONDERS reply for the $JS.API subjects) is carried as cause.

Remedies: start the server with the -js flag, or enable jetstream in its configuration file.

Constructors

JetStreamUnavailableError(cause: unknown)

Creates the error reported when JetStream cannot be probed at all.

Parameters
cause: unknown

The platform error the probe rejected with

Usage

import { JetStreamUnavailableError } from "messaging-plugin/src/index.ts";