#[non_exhaustive]pub enum RuntimeError {
Show 18 variants
OutputUnavailable {
id: EffectId,
},
OutputPayload {
id: EffectId,
source: PayloadError,
},
InputPayload {
id: EffectId,
source: PayloadError,
},
InputSchemaMismatch {
id: EffectId,
stored: u32,
requested: u32,
},
ContractMismatch {
id: EffectId,
},
LegacyContract {
id: EffectId,
},
Identity(IdentityError),
InputMismatch {
id: EffectId,
},
KindMismatch {
id: EffectId,
stored: EffectKind,
requested: EffectKind,
},
Input(Error),
Output {
id: EffectId,
source: Error,
},
PolicyViolation {
key: String,
requirement: &'static str,
},
NoSuchEffect {
key: String,
},
NotCompensable {
name: &'static str,
},
NotRegistered {
name: &'static str,
},
StoredInput {
id: EffectId,
source: Error,
},
Store(StoreError),
Internal(String),
}Expand description
Why the runtime could not process an effect.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
The effect committed externally but no replayable output was stored. This does not mean the external action failed.
OutputPayload
An older committed output needs an unsupported or failing migration.
InputPayload
Recovery cannot safely interpret the stored input schema.
InputSchemaMismatch
A caller supplied a different input schema for an existing key.
Fields
ContractMismatch
Existing safety assumptions differ from this call. Nothing is run or replayed; the authoritative record remains unchanged.
LegacyContract
A pre-contract unresolved record needs explicit operator review. Its original idempotency and verification assumptions are unknown.
Identity(IdentityError)
The effect name or logical key was invalid.
InputMismatch
The key was used before with a different input. Returning the earlier effect’s result would answer a question nobody asked.
KindMismatch
The key was used before with a different EffectKind.
Input(Error)
The input could not be serialized.
Output
A committed effect’s stored output does not deserialize into the requested type, e.g. because the type changed since it was recorded.
PolicyViolation
The runtime’s risk policy requires something the effect lacks, so it was refused before anything was recorded.
Fields
NoSuchEffect
No effect has this name and key.
NotCompensable
The handler is registered without .compensable(), so its effects
cannot be compensated.
NotRegistered
No handler of the submitted type is registered under its name.
StoredInput
A stored input no longer deserializes into the handler’s input type, e.g. because the type changed since the effect was recorded.
Store(StoreError)
The store failed. If this happens after the action ran, the effect stays in doubt and recovery will treat its outcome as unknown.
Internal(String)
The runtime’s own task failed (a bug in agent-effects).
Trait Implementations§
Source§impl Debug for RuntimeError
impl Debug for RuntimeError
Source§impl Display for RuntimeError
impl Display for RuntimeError
Source§impl Error for RuntimeError
impl Error for RuntimeError
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()