#[non_exhaustive]pub enum RuntimeError {
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
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()