Skip to content
masterclass Buddy

LangChain · Error

ToolException

ToolException reports a tool execution error. BaseTool.handle_tool_error controls whether the error is raised again or returned to the agent as tool output.

Last updated

Since
v1.7

Syntax

class ToolException(Exception)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • BaseTool
  • handle_tool_error
  • ToolMessage
  • ToolExceptionHandlerOutput

Source: ToolException | langchain_core | LangChain Reference. Checked 2026-11-03.