pub enum StoreError {
SequenceConflict {
expected: u64,
found: u64,
},
NotFound {
workflow_id: WorkflowId,
},
AssistantSessionNotFound {
session_id: String,
},
NotOwner {
shard: usize,
},
InvalidQuery(String),
Backend(String),
Serialization(String),
}Expand description
Errors returned by crate::ReadableEventStore and crate::EventStore implementations.
Variants§
SequenceConflict
The workflow history head did not match the caller’s optimistic-concurrency guard.
Fields
NotFound
Reserved for operations that target a must-exist workflow; read and query methods return
empty results, not NotFound, for absent workflows.
Fields
workflow_id: WorkflowIdWorkflow identifier targeted by the must-exist operation.
AssistantSessionNotFound
An assistant-session transcript append named a session with no record.
Deliberately NOT a silent create: a transcript with no session record is
a conversation with no owner, no harness and no subject, which every
read surface would then have to invent an answer for. Shaped like
Self::NotFound — the must-exist refusal — but carrying a session id
rather than a workflow id, because an assistant session is not a workflow
and has no workflow identity to borrow.
NotOwner
The targeted shard is owned by a different node: a quorum write was fenced
because this node is not the current owner of the workflow’s shard. Unlike
Self::Backend this is a typed, retryable routing signal — the caller
(or the request-routing edge) should re-resolve the shard’s owner and retry
or forward, rather than treating it as an opaque internal failure. Emitted
only on the distributed ([store.cluster]) replication path.
InvalidQuery(String)
A list request the store refuses on its face: a zero page limit, or a cursor that was not minted under the request’s own namespace, filter, and sort. Never a backend fault; the caller’s input is wrong.
Backend(String)
Backend-specific failure mapped into the store contract’s closed error surface.
Serialization(String)
Serialization or deserialization failure while crossing the store boundary.
Trait Implementations§
Source§impl Clone for StoreError
impl Clone for StoreError
Source§fn clone(&self) -> StoreError
fn clone(&self) -> StoreError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
impl Eq for StoreError
Source§impl Error for StoreError
impl Error for StoreError
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()