ClusterError.ts
ClusterError.ts overview
Section titled “ClusterError.ts overview”Defines the structured errors used by the unstable cluster runtime.
These tagged, schema-backed errors describe failures at routing, runner membership, serialization, persistence, mailbox capacity, and duplicate envelope boundaries. Cluster clients, runners, and storage adapters use these shared error values to report failures through typed Effect errors.
Since v4.0.0
Exports Grouped by Category
Section titled “Exports Grouped by Category”- errors
errors
Section titled “errors”AlreadyProcessingMessage (class)
Section titled “AlreadyProcessingMessage (class)”Represents an error that occurs when the same request envelope is already being processed.
Details
Carries the address and envelopeId for the affected request envelope.
Signature
declare class AlreadyProcessingMessageSince v4.0.0
is (static method)
Section titled “is (static method)”Returns true when the value is an AlreadyProcessingMessage error.
Signature
declare const is: (u: unknown) => u is AlreadyProcessingMessageSince v4.0.0
[TypeId] (property)
Section titled “[TypeId] (property)”Marks this value as a cluster error for runtime guards.
Signature
readonly [TypeId]: "~effect/cluster/ClusterError"Since v4.0.0
EntityNotAssignedToRunner (class)
Section titled “EntityNotAssignedToRunner (class)”Represents an error that occurs when a Runner receives a message for an entity that is not assigned to the receiving runner.
Signature
declare class EntityNotAssignedToRunnerSince v4.0.0
is (static method)
Section titled “is (static method)”Returns true when the value is an EntityNotAssignedToRunner error.
Signature
declare const is: (u: unknown) => u is EntityNotAssignedToRunnerSince v4.0.0
[TypeId] (property)
Section titled “[TypeId] (property)”Marks this value as a cluster error for runtime guards.
Signature
readonly [TypeId]: "~effect/cluster/ClusterError"Since v4.0.0
MailboxFull (class)
Section titled “MailboxFull (class)”Represents an error that occurs when the entity mailbox is full.
Details
Carries the address whose bounded mailbox is at capacity.
Gotchas
Volatile requests fail immediately. Persisted or durable messages are retried or resumed from storage when the mailbox is full.
Signature
declare class MailboxFullSince v4.0.0
is (static method)
Section titled “is (static method)”Returns true when the value is a MailboxFull error.
Signature
declare const is: (u: unknown) => u is MailboxFullSince v4.0.0
[TypeId] (property)
Section titled “[TypeId] (property)”Marks this value as a cluster error for runtime guards.
Signature
readonly [TypeId]: "~effect/cluster/ClusterError"Since v4.0.0
MalformedMessage (class)
Section titled “MalformedMessage (class)”Represents an error that occurs when a message fails at a schema serialization or deserialization boundary.
Details
cause carries the underlying failure. refail maps encode and decode
failures into MalformedMessage values.
Signature
declare class MalformedMessageSince v4.0.0
is (static method)
Section titled “is (static method)”Returns true when the value is a MalformedMessage error.
Signature
declare const is: (u: unknown) => u is MalformedMessageSince v4.0.0
[TypeId] (property)
Section titled “[TypeId] (property)”Marks this value as a cluster error for runtime guards.
Signature
readonly [TypeId]: "~effect/cluster/ClusterError"Since v4.0.0
PersistenceError (class)
Section titled “PersistenceError (class)”Represents an error that occurs when a message fails to be persisted into cluster’s mailbox storage.
Signature
declare class PersistenceErrorSince v4.0.0
refail (static method)
Section titled “refail (static method)”Maps failures from the supplied effect into PersistenceError values.
Signature
declare const refail: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, PersistenceError, R>Since v4.0.0
[TypeId] (property)
Section titled “[TypeId] (property)”Marks this value as a cluster error for runtime guards.
Signature
readonly [TypeId]: "~effect/cluster/ClusterError"Since v4.0.0
RunnerNotRegistered (class)
Section titled “RunnerNotRegistered (class)”Represents an error that occurs when a Runner is not registered with the shard manager.
Signature
declare class RunnerNotRegisteredSince v4.0.0
[TypeId] (property)
Section titled “[TypeId] (property)”Marks this value as a cluster error for runtime guards.
Signature
readonly [TypeId]: "~effect/cluster/ClusterError"Since v4.0.0
RunnerUnavailable (class)
Section titled “RunnerUnavailable (class)”Represents an error that occurs when a Runner is unresponsive.
Signature
declare class RunnerUnavailableSince v4.0.0
is (static method)
Section titled “is (static method)”Returns true when the value is a RunnerUnavailable error.
Signature
declare const is: (u: unknown) => u is RunnerUnavailableSince v4.0.0
[TypeId] (property)
Section titled “[TypeId] (property)”Marks this value as a cluster error for runtime guards.
Signature
readonly [TypeId]: "~effect/cluster/ClusterError"Since v4.0.0