pub enum AacodeError {
Config(String),
Network(String),
Api(String),
Tool(String),
Json(String),
Io(String),
Cancelled,
Other(String),
}Expand description
The central error type for the agent. Kept dependency-free (no thiserror) to minimize the compiled binary footprint on mobile targets.
Variants§
Config(String)
Configuration problem (missing api key, bad model, etc.)
Network(String)
Network / HTTP transport failure (retryable classification lives in llm).
Api(String)
LLM API returned an error status or malformed payload.
Tool(String)
Tool invocation failed (bad args, execution error).
Json(String)
JSON (de)serialization failure.
Io(String)
Filesystem / IO failure.
Cancelled
The task was cancelled by the caller.
Other(String)
Anything that does not fit the buckets above.
Implementations§
Source§impl AacodeError
impl AacodeError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Whether this error is worth retrying (transient network / 5xx / timeout).
Trait Implementations§
Source§impl Debug for AacodeError
impl Debug for AacodeError
Source§impl Display for AacodeError
impl Display for AacodeError
Source§impl Error for AacodeError
impl Error for AacodeError
1.30.0 · 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 AacodeError
impl From<Error> for AacodeError
Source§fn from(e: Error) -> AacodeError
fn from(e: Error) -> AacodeError
Converts to this type from the input type.
Source§impl From<Error> for AacodeError
impl From<Error> for AacodeError
Source§fn from(e: Error) -> AacodeError
fn from(e: Error) -> AacodeError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AacodeError
impl RefUnwindSafe for AacodeError
impl Send for AacodeError
impl Sync for AacodeError
impl Unpin for AacodeError
impl UnsafeUnpin for AacodeError
impl UnwindSafe for AacodeError
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