pub type OnToolErrorCallback = Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, String) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>;Expand description
Callback invoked when a tool execution fails (after retries are exhausted).
This is the canonical, framework-level tool-error callback type shared by
adk-agent (builder registration) and adk-plugin (plugin hooks).
Returns Ok(Some(value)) to substitute a fallback result as the function
response to the LLM, or Ok(None) to let the next callback (or the
original error) propagate.
Aliased Typeยง
pub struct OnToolErrorCallback(/* private fields */);