pub enum Error {
Show 27 variants
AgentConfig(String),
AgentExecution(String),
ProviderApi(String),
ProviderAuth(String),
ProviderRateLimit {
retry_after_secs: u64,
},
ToolNotFound(String),
ToolExecution {
tool_name: String,
message: String,
},
ToolApprovalRequired {
tool_name: String,
},
ToolArguments {
tool_name: String,
message: String,
},
MessageParse(String),
MessageSerialize(Error),
StreamInterrupted(String),
StreamTimeout {
timeout_secs: u64,
},
MemoryStorage(String),
MemoryRetrieval(String),
StrategyConfig(String),
StrategyExecution(String),
ConditionEvaluation(String),
RiskCheckFailed {
check_name: String,
reason: String,
},
RiskLimitExceeded {
limit_type: String,
current: String,
max: String,
},
Simulation(String),
AgentCoordination(String),
AgentCommunication(String),
Http(Error),
Io(Error),
Internal(String),
Other(Error),
}Expand description
Main error type for the aagt framework
Variants§
AgentConfig(String)
Agent is not properly configured
AgentExecution(String)
Agent execution failed
ProviderApi(String)
Provider API error
ProviderAuth(String)
Provider authentication failed
ProviderRateLimit
Provider rate limit exceeded
ToolNotFound(String)
Tool not found in agent’s toolset
ToolExecution
Tool execution failed
ToolApprovalRequired
Tool approval required
ToolArguments
Invalid tool arguments
MessageParse(String)
Message parsing failed
MessageSerialize(Error)
Message serialization failed
StreamInterrupted(String)
Stream interrupted
StreamTimeout
Stream timeout
MemoryStorage(String)
Memory storage error
MemoryRetrieval(String)
Memory retrieval error
StrategyConfig(String)
Strategy configuration error
StrategyExecution(String)
Strategy execution error
ConditionEvaluation(String)
Condition evaluation error
RiskCheckFailed
Risk check failed - transaction blocked
RiskLimitExceeded
Risk limit exceeded
Fields
Simulation(String)
Simulation failed
AgentCoordination(String)
Agent coordination error
AgentCommunication(String)
Agent communication error
Http(Error)
HTTP request failed
Io(Error)
IO error
Internal(String)
Internal error
Other(Error)
Any other error
Implementations§
Source§impl Error
impl Error
Sourcepub fn agent_config(msg: impl Into<String>) -> Self
pub fn agent_config(msg: impl Into<String>) -> Self
Create a new agent configuration error
Sourcepub fn tool_execution(
tool_name: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn tool_execution( tool_name: impl Into<String>, message: impl Into<String>, ) -> Self
Create a new tool execution error
Sourcepub fn risk_check_failed(
check_name: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn risk_check_failed( check_name: impl Into<String>, reason: impl Into<String>, ) -> Self
Create a new risk check failed error
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this error is retryable
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
self file descriptor. Read moreSource§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§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.