pub enum ToolErrorCategory {
Transient {
error: String,
retry_strategy: RetryStrategy,
},
InputValidation {
error: String,
suggestion: Option<String>,
},
ExternalService {
error: String,
service: String,
retry_after: Option<Duration>,
},
Permission {
error: String,
required_permission: String,
},
Logic {
error: String,
context: String,
},
Resource {
error: String,
resource_type: ResourceType,
},
Unknown {
error: String,
},
}Expand description
Error taxonomy based on AgentDebug paper (arxiv:2509.25370)
Variants§
Transient
Transient errors that may succeed on retry (network issues, timeouts).
InputValidation
Input validation errors - need different input parameters.
ExternalService
External service errors (API limits, service unavailable).
Fields
Permission
Permission/access errors - won’t succeed without user action.
Logic
Logic errors - indicates model misunderstanding of tool usage.
Resource
Resource errors - file not found, memory, disk space.
Unknown
Unknown/unclassified errors.
Implementations§
Source§impl ToolErrorCategory
impl ToolErrorCategory
Sourcepub fn category_name(&self) -> &'static str
pub fn category_name(&self) -> &'static str
Return the category name as a static string.
Sourcepub fn error_message(&self) -> &str
pub fn error_message(&self) -> &str
Return the error message string.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Whether this error category is retryable.
Sourcepub fn retry_strategy(&self) -> RetryStrategy
pub fn retry_strategy(&self) -> RetryStrategy
Return the retry strategy for this error.
Sourcepub fn get_suggestion(&self) -> Option<String>
pub fn get_suggestion(&self) -> Option<String>
Get a suggestion for resolving this error, if available.
Trait Implementations§
Source§impl Clone for ToolErrorCategory
impl Clone for ToolErrorCategory
Source§fn clone(&self) -> ToolErrorCategory
fn clone(&self) -> ToolErrorCategory
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolErrorCategory
impl Debug for ToolErrorCategory
Source§impl PartialEq for ToolErrorCategory
impl PartialEq for ToolErrorCategory
impl StructuralPartialEq for ToolErrorCategory
Auto Trait Implementations§
impl Freeze for ToolErrorCategory
impl RefUnwindSafe for ToolErrorCategory
impl Send for ToolErrorCategory
impl Sync for ToolErrorCategory
impl Unpin for ToolErrorCategory
impl UnsafeUnpin for ToolErrorCategory
impl UnwindSafe for ToolErrorCategory
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