#[non_exhaustive]pub enum ProjectionError {
SequenceBackward {
last: ProjectionCursor,
incoming: ProjectionCursor,
},
SequenceGap {
last: ProjectionCursor,
incoming: ProjectionCursor,
},
PositionConflict {
at: ProjectionCursor,
},
NotActive {
state: ObserverState,
},
Storage(&'static str),
DecodeFailed(&'static str),
MissingRow,
}Expand description
Projection-side failure taxonomy.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SequenceBackward
The event stream moved backward (corruption, mis-ordered redelivery,
or two computes sharing one tick — see
ProjectionRouter::dispatch).
Fields
last: ProjectionCursorStream head the incoming event was ordered against — the last accepted event or, when a failed dispatch is awaiting retry, the pinned unapplied position.
incoming: ProjectionCursorPosition of the rejected incoming event.
SequenceGap
The stream skipped an event — a same-tick sequence jump, or a new tick whose batch does not start at sequence 0. The replay harness needs to fetch the missing range before dispatch can advance.
Fields
last: ProjectionCursorStream head the incoming event was ordered against — the last accepted event or, when a failed dispatch is awaiting retry, the pinned unapplied position.
incoming: ProjectionCursorPosition of the event that exposed the gap.
PositionConflict
A DIFFERENT event arrived at a position the router has already
pinned — the accepted cursor position, or a failed dispatch’s
pending-retry pin. Two same-tick computes collided on the
(tick, sequence) identity (driver contract violation),
distinguished from a true redelivery/retry by event identity
(type code + payload).
Fields
at: ProjectionCursorThe contested stream position.
NotActive
Caller attempted a mutation in a non-Active state (observer is
Passive or Draining).
Fields
state: ObserverStateObserver state at the time of the attempted mutation.
Storage(&'static str)
Storage-layer error (in-memory corruption, PG driver, …).
DecodeFailed(&'static str)
Event payload failed to decode.
MissingRow
An event targeted an Actor / Space / Entry / Activity that the projection has no row for.
Trait Implementations§
Source§impl Debug for ProjectionError
impl Debug for ProjectionError
Source§impl Display for ProjectionError
impl Display for ProjectionError
Source§impl Error for ProjectionError
impl Error for ProjectionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()