pub enum ToolCallExecutionError {
HttpError {
status: u16,
message: String,
details: Option<Value>,
},
NetworkError {
message: String,
category: NetworkErrorCategory,
},
ResponseParsingError {
reason: String,
raw_response: Option<String>,
},
}Expand description
Execution errors that occur during tool execution These return as Ok(CallToolResult { is_error: true })
Variants§
HttpError
HTTP error response from the API
Fields
NetworkError
Network/connection failures
Fields
§
category: NetworkErrorCategoryError category for better handling
ResponseParsingError
Response parsing failed
Trait Implementations§
Source§impl Debug for ToolCallExecutionError
impl Debug for ToolCallExecutionError
Source§impl Display for ToolCallExecutionError
impl Display for ToolCallExecutionError
Source§impl Error for ToolCallExecutionError
impl Error for ToolCallExecutionError
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<ToolCallExecutionError> for ToolCallError
impl From<ToolCallExecutionError> for ToolCallError
Source§fn from(source: ToolCallExecutionError) -> Self
fn from(source: ToolCallExecutionError) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for ToolCallExecutionError
impl JsonSchema for ToolCallExecutionError
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ToolCallExecutionError
impl RefUnwindSafe for ToolCallExecutionError
impl Send for ToolCallExecutionError
impl Sync for ToolCallExecutionError
impl Unpin for ToolCallExecutionError
impl UnwindSafe for ToolCallExecutionError
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> 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> 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.