on_tool_error() — langchain Function Reference
Architecture documentation for the on_tool_error() function in manager.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 02639266_0981_41cb_ea80_7d68e6d0a8a5["on_tool_error()"] aff7625c_33b8_6f74_3aba_89e8a85fa229["CallbackManagerForToolRun"] 02639266_0981_41cb_ea80_7d68e6d0a8a5 -->|defined in| aff7625c_33b8_6f74_3aba_89e8a85fa229 f7fd0a02_66f3_0957_eff7_137f2d4e607d["on_tool_error()"] f7fd0a02_66f3_0957_eff7_137f2d4e607d -->|calls| 02639266_0981_41cb_ea80_7d68e6d0a8a5 f7fd0a02_66f3_0957_eff7_137f2d4e607d["on_tool_error()"] 02639266_0981_41cb_ea80_7d68e6d0a8a5 -->|calls| f7fd0a02_66f3_0957_eff7_137f2d4e607d 8964b4e9_440e_18a7_2a15_a54a0b2b733c["handle_event()"] 02639266_0981_41cb_ea80_7d68e6d0a8a5 -->|calls| 8964b4e9_440e_18a7_2a15_a54a0b2b733c style 02639266_0981_41cb_ea80_7d68e6d0a8a5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/callbacks/manager.py lines 1082–1105
def on_tool_error(
self,
error: BaseException,
**kwargs: Any,
) -> None:
"""Run when tool errors.
Args:
error: The error.
**kwargs: Additional keyword arguments.
"""
if not self.handlers:
return
handle_event(
self.handlers,
"on_tool_error",
"ignore_agent",
error,
run_id=self.run_id,
parent_run_id=self.parent_run_id,
tags=self.tags,
**kwargs,
)
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does on_tool_error() do?
on_tool_error() is a function in the langchain codebase, defined in libs/core/langchain_core/callbacks/manager.py.
Where is on_tool_error() defined?
on_tool_error() is defined in libs/core/langchain_core/callbacks/manager.py at line 1082.
What does on_tool_error() call?
on_tool_error() calls 2 function(s): handle_event, on_tool_error.
What calls on_tool_error()?
on_tool_error() is called by 1 function(s): on_tool_error.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free