Home / Function/ on_tool_error() — langchain Function Reference

on_tool_error() — langchain Function Reference

Architecture documentation for the on_tool_error() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  76fdfac8_ff2f_aaba_3924_597e7bfab872["on_tool_error()"]
  c9d25419_44e4_bde7_ebba_40ba46d3cb6a["ToolManagerMixin"]
  76fdfac8_ff2f_aaba_3924_597e7bfab872 -->|defined in| c9d25419_44e4_bde7_ebba_40ba46d3cb6a
  9ab10cd9_db1e_9146_283d_8ccd4942c62b["on_tool_error()"]
  9ab10cd9_db1e_9146_283d_8ccd4942c62b -->|calls| 76fdfac8_ff2f_aaba_3924_597e7bfab872
  9ab10cd9_db1e_9146_283d_8ccd4942c62b["on_tool_error()"]
  76fdfac8_ff2f_aaba_3924_597e7bfab872 -->|calls| 9ab10cd9_db1e_9146_283d_8ccd4942c62b
  style 76fdfac8_ff2f_aaba_3924_597e7bfab872 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/base.py lines 220–235

    def on_tool_error(
        self,
        error: BaseException,
        *,
        run_id: UUID,
        parent_run_id: UUID | None = None,
        **kwargs: Any,
    ) -> Any:
        """Run when tool errors.

        Args:
            error: The error that occurred.
            run_id: The ID of the current run.
            parent_run_id: The ID of the parent run.
            **kwargs: Additional keyword arguments.
        """

Domain

Subdomains

Called By

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/base.py.
Where is on_tool_error() defined?
on_tool_error() is defined in libs/core/langchain_core/callbacks/base.py at line 220.
What does on_tool_error() call?
on_tool_error() calls 1 function(s): 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