Skip to content

ClusterError.ts

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



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 AlreadyProcessingMessage

Source

Since v4.0.0

Returns true when the value is an AlreadyProcessingMessage error.

Signature

declare const is: (u: unknown) => u is AlreadyProcessingMessage

Source

Since v4.0.0

Marks this value as a cluster error for runtime guards.

Signature

readonly [TypeId]: "~effect/cluster/ClusterError"

Source

Since v4.0.0

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 EntityNotAssignedToRunner

Source

Since v4.0.0

Returns true when the value is an EntityNotAssignedToRunner error.

Signature

declare const is: (u: unknown) => u is EntityNotAssignedToRunner

Source

Since v4.0.0

Marks this value as a cluster error for runtime guards.

Signature

readonly [TypeId]: "~effect/cluster/ClusterError"

Source

Since v4.0.0

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 MailboxFull

Source

Since v4.0.0

Returns true when the value is a MailboxFull error.

Signature

declare const is: (u: unknown) => u is MailboxFull

Source

Since v4.0.0

Marks this value as a cluster error for runtime guards.

Signature

readonly [TypeId]: "~effect/cluster/ClusterError"

Source

Since v4.0.0

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 MalformedMessage

Source

Since v4.0.0

Returns true when the value is a MalformedMessage error.

Signature

declare const is: (u: unknown) => u is MalformedMessage

Source

Since v4.0.0

Marks this value as a cluster error for runtime guards.

Signature

readonly [TypeId]: "~effect/cluster/ClusterError"

Source

Since v4.0.0

Represents an error that occurs when a message fails to be persisted into cluster’s mailbox storage.

Signature

declare class PersistenceError

Source

Since v4.0.0

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>

Source

Since v4.0.0

Marks this value as a cluster error for runtime guards.

Signature

readonly [TypeId]: "~effect/cluster/ClusterError"

Source

Since v4.0.0

Represents an error that occurs when a Runner is not registered with the shard manager.

Signature

declare class RunnerNotRegistered

Source

Since v4.0.0

Marks this value as a cluster error for runtime guards.

Signature

readonly [TypeId]: "~effect/cluster/ClusterError"

Source

Since v4.0.0

Represents an error that occurs when a Runner is unresponsive.

Signature

declare class RunnerUnavailable

Source

Since v4.0.0

Returns true when the value is a RunnerUnavailable error.

Signature

declare const is: (u: unknown) => u is RunnerUnavailable

Source

Since v4.0.0

Marks this value as a cluster error for runtime guards.

Signature

readonly [TypeId]: "~effect/cluster/ClusterError"

Source

Since v4.0.0