#[non_exhaustive]pub enum ToolCallError {
InvalidArgs(String),
ExecutionFailed {
code: String,
message: String,
retryable: bool,
},
InternalError(String),
RateLimited {
tool_id: String,
limit: u32,
retry_after_ms: Option<u64>,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidArgs(String)
Schema validation failed or args couldn’t be coerced to the expected shape. The tool’s own logic did not execute.
ExecutionFailed
Tool ran to completion but reports a failure outcome. This is the domain-level “the operation didn’t succeed” case, not a server error.
InternalError(String)
Server-side bug or unexpected condition during tool invocation.
RateLimited
Dispatch refused the call because the tool’s max_concurrent
semaphore is saturated. Emitted fail-fast — the tool never runs.
SP-operability-v1 C2.
Trait Implementations§
Source§impl Debug for ToolCallError
impl Debug for ToolCallError
Source§impl Display for ToolCallError
impl Display for ToolCallError
Source§impl Error for ToolCallError
impl Error for ToolCallError
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()
Auto Trait Implementations§
impl Freeze for ToolCallError
impl RefUnwindSafe for ToolCallError
impl Send for ToolCallError
impl Sync for ToolCallError
impl Unpin for ToolCallError
impl UnsafeUnpin for ToolCallError
impl UnwindSafe for ToolCallError
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