# Does LangGraph stop the run when a tool raises an error?

By default, yes, for a tool that raises while it executes: LangGraph's prebuilt `ToolNode` re-raises the exception, so the run stops there. It handles two errors by default, invalid arguments from the model and a call to a tool name that isn't registered. Each comes back as an error message the model can read and retry, such as "X is not a valid tool, try one of [...]".

The docstring puts the split this way: the default handler "Catches tool invocation errors" and "Ignores tool execution errors (they will be re-raised)". Setting `handle_tool_errors` to `True`, a string, an exception type, or a function changes that, and each of them turns a caught exception into a `ToolMessage` with status `error`. `False` turns off handling of exceptions a tool raises. An unknown tool name is still returned as a message.

The two outcomes fail differently. A stopped run is loud. A caught error is quiet: the model sees the message and may retry or carry on, and the trace shows a finished run. If you turn handling on, check what the agent does next, as [a failed tool call can end in a retry or a different approach](/answers/tool-calling/when-a-tool-call-fails-does-an-agent-retry-it-or-try-something-else).

---

Published: 2026-11-11

Sources:
- LangGraph ToolNode source and docstring, libs/prebuilt/langgraph/prebuilt/tool_node.py (commit 5ea88ec): https://github.com/langchain-ai/langgraph/blob/main/libs/prebuilt/langgraph/prebuilt/tool_node.py (fetched 2026-11-11)

Source: https://tessary.ai/answers/langgraph-evals/does-langgraph-stop-the-run-when-a-tool-raises-an-error
More on LangGraph evals: https://tessary.ai/answers/langgraph-evals
From Tessary, agent reliability for AI agents in production: https://tessary.ai
