Skip to main content

FallbackHandler

Trait FallbackHandler 

Source
pub trait FallbackHandler: Send + Sync {
    // Required method
    fn handle<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        error: &'life1 ToolError,
        invocation: &'life2 ToolInvocation,
    ) -> Pin<Box<dyn Future<Output = FallbackResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Handler for tool execution failures.

FallbackHandler allows workflows to recover from tool failures using configurable strategies (retry, skip, custom handlers).

Required Methods§

Source

fn handle<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, error: &'life1 ToolError, invocation: &'life2 ToolInvocation, ) -> Pin<Box<dyn Future<Output = FallbackResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handles a tool execution error.

§Arguments
  • error - The error that occurred during tool execution
  • invocation - The invocation that caused the error
§Returns

A FallbackResult indicating whether to retry, skip, or fail

Implementors§