assistant-ui icon indicating copy to clipboard operation
assistant-ui copied to clipboard

fix(assistant-stream): handle tool execution errors gracefully

Open ShobhitPatra opened this issue 3 weeks ago • 1 comments

[!IMPORTANT] Adds error handling for tool execution in unstable_runPendingTools to return error details in ToolResponse.

  • Behavior:
    • Adds error handling in unstable_runPendingTools in toolResultStream.ts to catch execution errors and return a ToolResponse with isError: true and error message.
    • Updates unstable_runPendingTools to return original message if no tool calls exist.
  • Tests:
    • Adds test case in toolResultStream.test.ts to verify graceful handling of tool execution errors, ensuring isError: true and correct error message in result.

This description was created by Ellipsis for cbc0a8247695a7a94e8ca5b104aac287ed931634. You can customize this summary. It will automatically update as commits are pushed.

ShobhitPatra avatar Nov 30 '25 16:11 ShobhitPatra

⚠️ No Changeset found

Latest commit: cbc0a8247695a7a94e8ca5b104aac287ed931634

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Nov 30 '25 16:11 changeset-bot[bot]