#[non_exhaustive]pub enum A2aStorageError {
Show 15 variants
TaskNotFound(String),
InvalidTransition {
current: TaskState,
requested: TaskState,
},
TerminalState(TaskState),
TerminalStateAlreadySet {
task_id: String,
current_state: String,
},
OwnerMismatch {
task_id: String,
},
TenantMismatch {
task_id: String,
},
ConcurrentModification(String),
PushConfigNotFound(String),
ClaimAlreadyHeld {
tenant: String,
task_id: String,
event_sequence: u64,
config_id: String,
},
StaleDeliveryClaim {
tenant: String,
task_id: String,
event_sequence: u64,
config_id: String,
},
CreateConfigCasTimeout {
tenant: String,
task_id: String,
},
DatabaseError(String),
SerializationError(String),
TypeError(A2aTypeError),
Generic(String),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TaskNotFound(String)
InvalidTransition
TerminalState(TaskState)
TerminalStateAlreadySet
The atomic store’s single-terminal-writer invariant rejected a
terminal write because the task was already in a terminal state
at the time of the CAS. Distinct from Self::TerminalState
which is the raw state-machine signal: TerminalStateAlreadySet
is specifically the “you lost the race” signal emitted by
crate::storage::A2aAtomicStore::update_task_status_with_events.
Callers typically translate this to HTTP 409 TaskNotCancelable /
JSON-RPC -32002 on the wire, and to EventSink::closed semantics
when the caller is an executor sink.
The current_state field carries the wire enum name (e.g.
"TASK_STATE_COMPLETED") so log/telemetry consumers can see
exactly which terminal won the race.
OwnerMismatch
TenantMismatch
ConcurrentModification(String)
PushConfigNotFound(String)
ClaimAlreadyHeld
The push delivery claim for a (tenant, task_id, event_sequence, config_id) tuple is already held by another instance whose claim
has not yet expired, OR the tuple has already reached a terminal
outcome (Succeeded, GaveUp, Abandoned) and cannot be
re-claimed regardless of expiry.
Returned only by
crate::push::A2aPushDeliveryStore::claim_delivery. Callers
treat this as “skip delivery on this instance” — the event is
already being (or has already been) handled.
StaleDeliveryClaim
The claim identity passed to
crate::push::A2aPushDeliveryStore::record_delivery_outcome
does not match the currently-stored claim for this tuple.
Two causes: the claim expired and another instance re-claimed
(generation advanced), or the same instance’s prior process
died and the restarted process holds a different claimant
identifier. Either way, the stale caller’s outcome is
dropped so it cannot overwrite a terminal state committed by
the current claimant.
Workers that receive this error MUST abort their retry loop for the affected tuple — the current claimant (or whoever re-claims next) owns the remaining lifecycle.
CreateConfigCasTimeout
/ §6.4: create_config exhausted its bounded
retry budget (default 5 attempts with 10/50/250/1000 ms
backoff) while its CAS against a2a_tasks.latest_event_sequence
kept losing to concurrent event commits. The operator should
retry the create from the handler; in practice this surfaces
only under pathological event-burst workloads against a single
task.
DatabaseError(String)
SerializationError(String)
TypeError(A2aTypeError)
Generic(String)
Trait Implementations§
Source§impl Debug for A2aStorageError
impl Debug for A2aStorageError
Source§impl Display for A2aStorageError
impl Display for A2aStorageError
Source§impl Error for A2aStorageError
impl Error for A2aStorageError
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()
Source§impl From<A2aStorageError> for A2aError
impl From<A2aStorageError> for A2aError
Source§fn from(err: A2aStorageError) -> Self
fn from(err: A2aStorageError) -> Self
Source§impl From<A2aTypeError> for A2aStorageError
impl From<A2aTypeError> for A2aStorageError
Source§fn from(source: A2aTypeError) -> Self
fn from(source: A2aTypeError) -> Self
Auto Trait Implementations§
impl Freeze for A2aStorageError
impl RefUnwindSafe for A2aStorageError
impl Send for A2aStorageError
impl Sync for A2aStorageError
impl Unpin for A2aStorageError
impl UnsafeUnpin for A2aStorageError
impl UnwindSafe for A2aStorageError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.