handle_tool_error: bool | str | Callable[[ToolException], ToolExceptionHandlerOutput] | NoneHandle ToolException raised by tool execution.
If False, the exception is re-raised. If True, the exception message is
returned as tool output. If a string is passed, that string is returned
as tool output. If a callable is passed, it receives the exception and
its return value is used as the tool output.
Callable handlers may return either a string or a list of message
content blocks. If the tool was invoked with a tool_call_id, the handled
content is wrapped in a ToolMessage with status="error".