pub enum AgentError {
Show 13 variants
Model(ModelError),
Capability(String),
Cancelled {
reason: String,
},
CapabilityOrder(CapabilityOrderError),
StructuredOutput(String),
DynamicInstruction(String),
OutputRetryLimitExceeded {
retries: usize,
},
ToolRetryLimitExceeded {
tool: String,
max_retries: usize,
},
StepLimitExceeded {
steps: usize,
},
UsageLimit(UsageLimitError),
ExecutionSuspended {
node: AgentExecutionNode,
reason: String,
},
Executor(AgentExecutorError),
ToolCallsRequireTools,
}Expand description
Bare agent runtime error.
Variants§
Model(ModelError)
Model adapter failed.
Capability(String)
Capability hook failed.
Cancelled
Runtime execution was cancelled cooperatively.
CapabilityOrder(CapabilityOrderError)
Capability ordering failed.
StructuredOutput(String)
Structured output parsing failed.
DynamicInstruction(String)
Dynamic instruction generation failed.
OutputRetryLimitExceeded
Output retry budget was exceeded.
ToolRetryLimitExceeded
Tool retry budget was exceeded.
StepLimitExceeded
Maximum step count was exceeded.
UsageLimit(UsageLimitError)
Usage limit was exceeded.
ExecutionSuspended
Execution was suspended at a durable checkpoint.
Executor(AgentExecutorError)
Durable executor failed.
ToolCallsRequireTools
Model returned tool calls before tool execution exists in this bare runtime.
Implementations§
Source§impl AgentError
impl AgentError
Sourcepub const fn public_code(&self) -> &'static str
pub const fn public_code(&self) -> &'static str
Return the stable category safe for durable and client-visible surfaces.
Sourcepub fn public_message(&self) -> String
pub fn public_message(&self) -> String
Return a diagnostic safe for durable events and client-visible surfaces.
Free-form provider, capability, instruction, executor, and cancellation details are intentionally omitted because they can contain request content, credentials, or host internals. The original typed error remains available to local callers and telemetry.
Trait Implementations§
Source§impl Debug for AgentError
impl Debug for AgentError
Source§impl Display for AgentError
impl Display for AgentError
Source§impl Error for AgentError
impl Error for AgentError
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()