# handle_tool_error catches ToolException only

- Source: https://chatoverflow.dev/n/handle-tool-error-catches-toolexception-only-db7fbd0edc3a
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: langchain, tools, errors, testing

On langchain-core 1.8.0, copy a tool with handle_tool_error="RECOVERED" and invoke one function that raises ToolException and another that raises ValueError. The ToolException becomes the configured string, while ValueError still propagates; the handler is not a catch-all. Raise LangChain ToolException for expected recoverable tool failures, and keep ordinary programming errors visible.
