NatsErrorCode
@horizon-republic/nestjs-jetstream
@horizon-republic/nestjs-jetstream / NatsErrorCode
NatsErrorCode
Defined in: src/server/infrastructure/nats-error-codes.ts:7
NATS JetStream API error codes used by the transport.
Ref: https://github.com/nats-io/nats-server (server error definitions) Codes verified across NATS 2.12.6-2.14.1 via integration tests (original codes: 2026-04-02).
Enumeration Members
ConsumerAlreadyExists
ConsumerAlreadyExists:
10148
Defined in: src/server/infrastructure/nats-error-codes.ts:12
Consumer name already in use with different configuration (race condition on create).
ConsumerNotFound
ConsumerNotFound:
10014
Defined in: src/server/infrastructure/nats-error-codes.ts:9
Consumer does not exist on the specified stream.
MessageSchedulesDisabled
MessageSchedulesDisabled:
10188
Defined in: src/server/infrastructure/nats-error-codes.ts:39
The stream does not allow message schedules.
MessageSchedulesPatternInvalid
MessageSchedulesPatternInvalid:
10189
Defined in: src/server/infrastructure/nats-error-codes.ts:42
The Nats-Schedule value is not a pattern this server accepts.
MessageSchedulesTargetInvalid
MessageSchedulesTargetInvalid:
10190
Defined in: src/server/infrastructure/nats-error-codes.ts:45
The schedule target is not a literal subject inside the same stream.
MessageSchedulesTimeZoneInvalid
MessageSchedulesTimeZoneInvalid:
10223
Defined in: src/server/infrastructure/nats-error-codes.ts:51
The schedule time zone is unknown to the server, usually an image without tzdata.
MessageSchedulesTtlInvalid
MessageSchedulesTtlInvalid:
10191
Defined in: src/server/infrastructure/nats-error-codes.ts:48
The schedule TTL is invalid, or the stream does not allow message TTLs.
NoSuitablePeers
NoSuitablePeers:
10005
Defined in: src/server/infrastructure/nats-error-codes.ts:27
No suitable peers for placement (fewer healthy peers than num_replicas,
or no peer has storage headroom). Confirmed at runtime by the cluster integration test.
StorageResourcesExceeded
StorageResourcesExceeded:
10047
Defined in: src/server/infrastructure/nats-error-codes.ts:21
Storage resources exceeded: reservation exceeds server max_file_store.
StreamAlreadyExists
StreamAlreadyExists:
10058
Defined in: src/server/infrastructure/nats-error-codes.ts:18
Stream name already in use with a different configuration (race condition on create).
StreamExpectedLastSeqPerSubjectNotReady
StreamExpectedLastSeqPerSubjectNotReady:
10163
Defined in: src/server/infrastructure/nats-error-codes.ts:36
The per-subject last sequence is momentarily unknown, for example after a leader change.
StreamNotFound
StreamNotFound:
10059
Defined in: src/server/infrastructure/nats-error-codes.ts:15
Stream does not exist.
StreamWrongLastSequence
StreamWrongLastSequence:
10071
Defined in: src/server/infrastructure/nats-error-codes.ts:30
expect.lastSubjectSequence did not match: the subject changed since it was read.
StreamWrongLastSequenceConstant
StreamWrongLastSequenceConstant:
10164
Defined in: src/server/infrastructure/nats-error-codes.ts:33
The same mismatch, reported without the sequence.