fix: Handle ToolExceptions

What does this merge request do and why?

Fixes unhandled ToolExceptions by handling them in a similar way to the way that TypeErrors or ValidationErrors are handled in tools_executor.py.

How to set up and validate locally

  1. Pull branch
  2. Run a workflow that touches a forbidden file path (such as "Read the files in .git")
  3. Workflow should not fail

Here's a couple of langsmith traces I ran locally [internal]:

  • Chat workflow: link
  • Software development workflow: link

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.
  • If this change requires executor implementation: verified that issues/MRs exist for both Go executor and Node executor or confirmed that changes are backward-compatible and don't break existing executor functionality.

Closes #1333 (closed)

Edited by Tim Morriss

Merge request reports

Loading