fix(v10/node): Stop leaking unhandled rejections on aborted Vercel AI streams - #24563
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f9c08eb. Configure here.
| }); | ||
| } | ||
|
|
||
| run(); |
There was a problem hiding this comment.
Test omits expected abort handling
Medium Severity
The aborted-stream scenario iterates textStream and leaves run uncaught, so the abort itself can reject. Sentry's default unhandled-rejection warn mode then writes to stderr, which makes ensureNoErrorOutput fail even after the instrumentation fix and prevents the test from isolating the extra rejection this PR addresses. The sibling scenario-rejected-model scenario catches the expected failure; this one does not.
Additional Locations (1)
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit f9c08eb. Configure here.
size-limit report 📦
|
…l payload The orchestrion Vercel AI path leaks unhandled rejections on an aborted stream for the same reason as v11: `end(error)` annotated the span but left the payload looking successful, so `beforeSpanEnd` enriched from the `StreamTextResult` and read its promise-valued getters.


Backport of #24540