Repository navigation
fix: let cancelled tool calls reject instead of reporting an error - #17
Merged
beaufortfrancois merged 1 commit intoNov 3, 2026
Merged
Conversation
kesku
force-pushed
the
fix/rethrow-cancelled-execute
branch
2 times, most recently
from
October 30, 2026 19:23
7b5bc42 to
01553fb
Compare
Collaborator
|
@kesku Please resolve conflicts and I'll merge this PR |
kesku
force-pushed
the
fix/rethrow-cancelled-execute
branch
from
November 2, 2026 17:16
00e2d7e to
2ee70b8
Compare
MrSunshyne
added a commit
to MrSunshyne/vue-webmcp
that referenced
this pull request
Nov 7, 2026
use-webmcp-tool now rethrows a throw or rejection that comes after the execution signal aborts, without calling onError (GoogleChromeLabs/use-webmcp-tool#17, 2026-11-03): a cancelled call is not a tool failure. We still ran onError and resolved to an isError result, so a page that shows tool errors would report a cancellation as one. The browser has already settled a cancelled call with the abort reason and drops whatever comes back, so the agent sees no difference; the visible change is that onError no longer runs. A failure before the abort is reported as before, including an AbortError the tool raises itself. Hooks still see the call, flagged cancelled: true, so analytics can count cancellations apart from failures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cancelled tool calls currently invoke
onErrorand return anisErrorresult. Rethrow when the execution signal has aborted, leaving live-error handling unchanged. This follows the cancellation behavior in the spec.Updated the tests and documentation.
npm test: 31 passing, no unhandled errors or rejections.