Files
langgraph/libs
Caspar BroekhuizenandGitHub 4eaab0284a feat(prebuilt): add support for handle_tool_errors with single exception type (#6021)
This PR extends the `ToolNode` `handle_tool_errors` property to also
accept a single exception type: `type[Exception]`.

Example:
```python
tool_node_with_error_handling = ToolNode(
    [tool1, tool2, tool3], handle_tool_errors=ValueError
).invoke(...)
"""A tool node that will only retry a failed tool call if a ValueError is raised"""
```
2025-08-26 18:49:55 -04:00
..
2025-07-24 00:36:02 +01:00
2025-07-22 13:20:55 -04:00