pub enum CodeError {
Config(String),
Llm(String),
Tool {
tool: String,
message: String,
},
Session(String),
Security(String),
Context(String),
Mcp(String),
Queue(String),
Io(Error),
Serialization(Error),
Internal(Error),
}Expand description
Categorized error type for A3S Code Core.
SDK bindings (Python/Node) can match on the variant to expose typed
exceptions (e.g., CodeConfigError, CodeLlmError).
Variants§
Config(String)
Configuration loading or parsing error
Llm(String)
LLM provider communication error
Tool
Tool execution error
Session(String)
Session management error
Security(String)
Security subsystem error
Context(String)
Context provider or context store error
Mcp(String)
MCP (Model Context Protocol) error
Queue(String)
Queue or lane error
Io(Error)
I/O error
Serialization(Error)
JSON serialization/deserialization error
Internal(Error)
Catch-all for errors not yet migrated to a specific variant.
The #[from] anyhow::Error conversion enables gradual migration:
any function returning anyhow::Result can be called with ? from
a function returning crate::error::Result without changes.
Trait Implementations§
Source§impl Error for CodeError
impl Error for CodeError
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()
Auto Trait Implementations§
impl Freeze for CodeError
impl !RefUnwindSafe for CodeError
impl Send for CodeError
impl Sync for CodeError
impl Unpin for CodeError
impl UnsafeUnpin for CodeError
impl !UnwindSafe for CodeError
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> Pointable for T
impl<T> Pointable for T
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.