Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReadableAsyncIterator error not handled #20347

Closed
fabiancook opened this issue Apr 26, 2018 · 3 comments
Closed

ReadableAsyncIterator error not handled #20347

fabiancook opened this issue Apr 26, 2018 · 3 comments
Labels
errors Issues and PRs related to JavaScript errors originated in Node.js core. promises Issues and PRs related to ECMAScript promises. stream Issues and PRs related to the stream subsystem.

Comments

@fabiancook
Copy link
Contributor

fabiancook commented Apr 26, 2018

It appears that this[kError] could never be anything other than null, as in onError, iter.error = is used rather than iter[kError] = , this means in next, this[kError] will always be null, and the error will always be sitting there.

It looks like that if the error occurs while waiting for the next read it will invoke this[kLastReject], at any other point it will go unnoticed.

I can't see anywhere iter.error is used, which is why I am making this issue

If I'm misdirected in what I am seeing, please do correct me 😀

Relevant link: https://github.com/nodejs/node/blob/master/lib/internal/streams/async_iterator.js#L61

@vsemozhetbyt vsemozhetbyt added stream Issues and PRs related to the stream subsystem. promises Issues and PRs related to ECMAScript promises. errors Issues and PRs related to JavaScript errors originated in Node.js core. labels Apr 27, 2018
@fabiancook fabiancook changed the title ReadableAsyncIterator error` ReadableAsyncIterator error not handled Apr 27, 2018
@ryzokuken
Copy link
Contributor

/cc @nodejs/streams @mcollina

@mcollina
Copy link
Member

There is already a fix for this: #20329.
It will likely go out on one of the next releases.

@fabiancook
Copy link
Contributor Author

Closed by PR #20329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
errors Issues and PRs related to JavaScript errors originated in Node.js core. promises Issues and PRs related to ECMAScript promises. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

No branches or pull requests

4 participants