#[non_exhaustive]pub enum FlowError {
Agent(String),
Json(Error),
Loop {
reason: String,
iter: u32,
},
Graph(String),
Bus(BusError),
Tool(ToolError),
Cancelled,
}Expand description
Errors returned by crate::flow::Flow::run and its concrete impls.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Agent(String)
An underlying klieo_core::Agent returned an error. Stringly
typed because Agent::Error is associated and not erasable.
Json(Error)
Marshalling between typed I/O and serde_json::Value failed.
Loop
crate::loop_flow::LoopFlow exceeded max_iters or its predicate
returned LoopVerdict::Failed.
Graph(String)
crate::graph::GraphFlow hit a cycle, missing node, or missing edge.
Bus(BusError)
Underlying bus surfaced a transient failure during a flow.
Tool(ToolError)
A crate::flow::Flow dispatched a tool via
klieo_core::tool::ToolInvoker and the invocation itself failed.
Typed (rather than stringified) so callers can match
klieo_core::error::ToolError::Cancelled /
klieo_core::error::ToolError::Retryable and keep the source
chain intact.
Cancelled
The flow observed AgentContext::cancel
before starting an iteration / step and stopped without doing further
work. Distinct from a body agent’s own error so callers can tell a
cooperative cancellation apart from a failure.
Trait Implementations§
Source§impl Error for FlowError
impl Error for FlowError
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()