_on_tool_error() — langchain Function Reference
Architecture documentation for the _on_tool_error() function in stdout.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 5033d38b_82f3_04f4_25ae_b621fca57066["_on_tool_error()"] 56d9fac7_db71_9c71_7cac_1d680d392fa0["FunctionCallbackHandler"] 5033d38b_82f3_04f4_25ae_b621fca57066 -->|defined in| 56d9fac7_db71_9c71_7cac_1d680d392fa0 1bda6774_d332_dec5_ed8f_8d6eef57961e["get_breadcrumbs()"] 5033d38b_82f3_04f4_25ae_b621fca57066 -->|calls| 1bda6774_d332_dec5_ed8f_8d6eef57961e 78a56963_548a_2192_487f_472b05419cba["elapsed()"] 5033d38b_82f3_04f4_25ae_b621fca57066 -->|calls| 78a56963_548a_2192_487f_472b05419cba style 5033d38b_82f3_04f4_25ae_b621fca57066 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/tracers/stdout.py lines 188–195
def _on_tool_error(self, run: Run) -> None:
crumbs = self.get_breadcrumbs(run)
self.function_callback(
f"{get_colored_text('[tool/error]', color='red')} "
+ get_bolded_text(f"[{crumbs}] [{elapsed(run)}] ")
+ f"Tool run errored with error:\n"
f"{run.error}"
)
Domain
Subdomains
Defined In
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/tracers/stdout.py.
Where is _on_tool_error() defined?
_on_tool_error() is defined in libs/core/langchain_core/tracers/stdout.py at line 188.
What does _on_tool_error() call?
_on_tool_error() calls 2 function(s): elapsed, get_breadcrumbs.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free