Home / Function/ on_chain_error() — langchain Function Reference

on_chain_error() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  d41b503f_7a64_7519_d09f_8a08437e5fa5["on_chain_error()"]
  64513429_d001_87b1_5f19_cc17a3f3577b["AsyncCallbackHandler"]
  d41b503f_7a64_7519_d09f_8a08437e5fa5 -->|defined in| 64513429_d001_87b1_5f19_cc17a3f3577b
  3f967c02_33c7_a0f4_b33a_51b2db4c8235["on_chain_error()"]
  3f967c02_33c7_a0f4_b33a_51b2db4c8235 -->|calls| d41b503f_7a64_7519_d09f_8a08437e5fa5
  3f967c02_33c7_a0f4_b33a_51b2db4c8235["on_chain_error()"]
  d41b503f_7a64_7519_d09f_8a08437e5fa5 -->|calls| 3f967c02_33c7_a0f4_b33a_51b2db4c8235
  style d41b503f_7a64_7519_d09f_8a08437e5fa5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/base.py lines 657–674

    async def on_chain_error(
        self,
        error: BaseException,
        *,
        run_id: UUID,
        parent_run_id: UUID | None = None,
        tags: list[str] | None = None,
        **kwargs: Any,
    ) -> None:
        """Run when chain errors.

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

Domain

Subdomains

Called By

Frequently Asked Questions

What does on_chain_error() do?
on_chain_error() is a function in the langchain codebase, defined in libs/core/langchain_core/callbacks/base.py.
Where is on_chain_error() defined?
on_chain_error() is defined in libs/core/langchain_core/callbacks/base.py at line 657.
What does on_chain_error() call?
on_chain_error() calls 1 function(s): on_chain_error.
What calls on_chain_error()?
on_chain_error() is called by 1 function(s): on_chain_error.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free