pub struct ErrorEnvelope {
pub kind: String,
pub code: Option<String>,
pub terminal_reason: Option<LlmTerminalReason>,
pub user_message: String,
pub raw: Option<String>,
pub retryable: Option<bool>,
pub provider_failure_kind: Option<ProviderFailureKind>,
}Expand description
Structured error payload carried on SessionEvent::Error (and
SessionEvent::RetryStatus).
Durability: this type appears inside persisted session snapshots and turn
checkpoints, so every field added after the initial shape must stay
additive — #[serde(default)] on decode and
#[serde(skip_serializing_if = "Option::is_none")] on encode — to keep
old snapshots decodable and new snapshots readable by older readers.
Fields§
§kind: String§code: Option<String>§terminal_reason: Option<LlmTerminalReason>§user_message: String§raw: Option<String>§retryable: Option<bool>Whether the failing operation is safe to retry, when the source
carries a typed signal (provider transports classify retryability).
None means the source did not know.
provider_failure_kind: Option<ProviderFailureKind>Typed provider-failure classification, set only when the error came
from an LLM provider/transport failure whose kind was classified
(an unclassified Unknown kind is surfaced as None).
Trait Implementations§
Source§impl Clone for ErrorEnvelope
impl Clone for ErrorEnvelope
Source§fn clone(&self) -> ErrorEnvelope
fn clone(&self) -> ErrorEnvelope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more