Skip to content

stream: reject push iterator.throw() with error#64380

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:stream-iter-push-readable-throw
Open

stream: reject push iterator.throw() with error#64380
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:stream-iter-push-readable-throw

Conversation

@trivikr

@trivikr trivikr commented Jul 9, 2026

Copy link
Copy Markdown
Member

Fixes: #64378

This updates stream/iter push readable iterators so
iterator.throw(error) rejects with the supplied error instead of
resolving with { done: true, value: undefined }.

The existing cancellation behavior is preserved: pending reads, writes,
and drain waiters still observe the consumer error.


Assisted-by: openai:gpt-5.5

Keep the existing consumer cancellation side effects, but
reject the iterator.throw() call with the supplied error
instead of resolving with done: true.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. stream Issues and PRs related to the stream subsystem. labels Jul 9, 2026
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 9, 2026
@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.24%. Comparing base (0032189) to head (b1e4e88).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #64380   +/-   ##
=======================================
  Coverage   90.23%   90.24%           
=======================================
  Files         741      741           
  Lines      241194   241194           
  Branches    45432    45431    -1     
=======================================
+ Hits       217640   217663   +23     
+ Misses      15129    15089   -40     
- Partials     8425     8442   +17     
Files with missing lines Coverage Δ
lib/internal/streams/iter/push.js 90.84% <100.00%> (ø)

... and 36 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stream/iter: push readable iterator.throw() resolves instead of rejecting

2 participants