#[non_exhaustive]pub enum DaimonError {
Show 17 variants
Model(String),
ToolExecution {
tool: String,
message: String,
},
ToolNotFound(String),
DuplicateTool(String),
Builder(String),
MaxIterations(usize),
Serialization(Error),
SchemaValidation {
tool: String,
errors: String,
},
StreamClosed,
Timeout(Duration),
Cancelled,
Orchestration(String),
Mcp(String),
BudgetExceeded {
spent: f64,
limit: f64,
},
GuardrailBlocked(String),
Storage {
message: String,
transient: bool,
},
Other(String),
}Expand description
The central error type for all Daimon operations.
Provider crates should map their transport-specific errors
(HTTP, gRPC, SDK) to DaimonError::Model.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Model(String)
An error originating from a model provider (API error, bad response, etc.).
ToolExecution
A tool failed during execution.
ToolNotFound(String)
The requested tool was not found in the registry.
DuplicateTool(String)
Attempted to register a tool with a name that already exists.
Builder(String)
The agent builder failed validation (e.g. missing required model).
MaxIterations(usize)
The agent exceeded the configured maximum number of iterations.
Serialization(Error)
A serialization or deserialization error.
SchemaValidation
Tool input failed JSON Schema validation.
Fields
StreamClosed
A stream was closed before completing.
Timeout(Duration)
A request timed out.
Cancelled
The operation was cancelled via a cancellation token.
Orchestration(String)
An orchestration error (chain or graph execution failure).
Mcp(String)
An MCP protocol error.
BudgetExceeded
The agent exceeded the configured spending budget.
GuardrailBlocked(String)
An input or output guardrail blocked the request.
Storage
A storage backend operation failed (checkpoint store, memory backend, broker state, or another persistence layer).
transient distinguishes failures that may succeed on retry
(connection refused, timeout, I/O contention) from permanent ones
(corrupt data, invalid keys, misconfiguration), so callers can decide
whether retrying is worthwhile without string-matching the message.
Fields
Other(String)
A catch-all for other errors.
Implementations§
Source§impl DaimonError
impl DaimonError
Sourcepub fn storage(message: impl Into<String>) -> Self
pub fn storage(message: impl Into<String>) -> Self
Creates a permanent (non-retryable) DaimonError::Storage error,
e.g. corrupt persisted data or an invalid storage key.
Sourcepub fn storage_transient(message: impl Into<String>) -> Self
pub fn storage_transient(message: impl Into<String>) -> Self
Creates a transient (retryable) DaimonError::Storage error,
e.g. a connection failure, timeout, or I/O error.
Trait Implementations§
Source§impl Debug for DaimonError
impl Debug for DaimonError
Source§impl Display for DaimonError
impl Display for DaimonError
Source§impl Error for DaimonError
impl Error for DaimonError
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()