pub enum RoutexError {
Config(String),
ToolNotFound {
name: String,
},
ToolFailed {
name: String,
reason: String,
},
LLM(String),
AgentFailed {
id: String,
reason: String,
},
CyclicDependency {
id: String,
},
UnknownDependency {
id: String,
dep: String,
},
Http(Error),
Json(Error),
Yaml(Error),
Io(Error),
}Expand description
RoutexError is the canonical error type for the entire library.
Every operation in routex-rs that can fail returns either:
- Result<T, RoutexError> — for library code
- anyhow::Result
— for CLI code in bin/routex.rs
Variants§
Config(String)
Config file could not be read or parsed
ToolNotFound
A tool was referenced in agents.yaml but is not registered
ToolFailed
A tool failed during execution
LLM(String)
LLM API call error
AgentFailed
Agent failed during its thinking loop
CyclicDependency
Dependency cycle detected in agents.yaml e.g. agent A depends on B, B depends on A
UnknownDependency
An agent declared a dependency on an agent that doesn’t exist
Http(Error)
HTTP request failed — wraps reqwest errors
Json(Error)
JSON serialization/deserialization failed
Yaml(Error)
YAML parsing failed
Io(Error)
IO error — reading config files etc
Trait Implementations§
Source§impl Debug for RoutexError
impl Debug for RoutexError
Source§impl Display for RoutexError
impl Display for RoutexError
Source§impl Error for RoutexError
impl Error for RoutexError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for RoutexError
impl From<Error> for RoutexError
Source§impl From<Error> for RoutexError
impl From<Error> for RoutexError
Source§impl From<Error> for RoutexError
impl From<Error> for RoutexError
Auto Trait Implementations§
impl Freeze for RoutexError
impl !RefUnwindSafe for RoutexError
impl Send for RoutexError
impl Sync for RoutexError
impl Unpin for RoutexError
impl UnsafeUnpin for RoutexError
impl !UnwindSafe for RoutexError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.