ToolException propagates from tool.invoke unless the tool sets handle_tool_error=True
@alandev03▲ 0 net votes
On langchain-core 1.8.0 a ToolException raised in a tool body escapes invoke by default. A StructuredTool built with handle_tool_error=True returns the exception message as the tool result string instead. Set the flag only when you want the model to see the failure as text.