pub enum EngineError {
ThinkFailed(String),
ProcessFailed(String),
ContextFailed(String),
Config(String),
Cancelled,
}Expand description
Errors that can occur during agent engine operation.
Variants§
ThinkFailed(String)
The Thinker failed to produce a response.
Defaults to retryable (transient provider failures are common). Callers may inspect the message for permanent failures.
ProcessFailed(String)
The output processor failed during processing.
Not retryable by default — usually indicates invalid input or a deterministic execution failure.
ContextFailed(String)
The context builder failed during processing.
Not retryable by default — usually indicates broken state or configuration.
Config(String)
Engine construction or configuration failed (e.g. missing thinker).
Not retryable — fix the configuration before rebuilding.
Cancelled
The engine was cancelled by the user or system.
Implementations§
Source§impl EngineError
impl EngineError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns true if the operation can be safely retried.
Classification is conservative for structural failures and optimistic for thinker/cancellation paths:
| Variant | Retryable |
|---|---|
Cancelled | yes |
ThinkFailed | yes (default; may be permanent) |
ContextFailed | no |
ProcessFailed | no |
Config | no |
Trait Implementations§
Source§impl Debug for EngineError
impl Debug for EngineError
Source§impl Display for EngineError
impl Display for EngineError
Source§impl Error for EngineError
impl Error for EngineError
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()