Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Errors thrown in nextHandler passed to subscribe should not tear down observable #2167

Closed
benlesh opened this issue Dec 1, 2016 · 3 comments

Comments

@benlesh
Copy link
Member

benlesh commented Dec 1, 2016

This is coming from the TC39 proposal (cc @jhusain)

Basically, to match the behavior of EventTarget, an error in the handler shouldn't cause the source to stop emitting values. In other words:

Observable.interval(1000)
  .subscribe({
    next(x) {
      if (x === 1) throw new Error('bad');
      console.log(x);
    }
  });

// 0
// ERROR: bad [callstack vomit here]
// 1
// 2
// 3
// ...
@mattpodwysocki
Copy link
Collaborator

@Blesh as far as I remember, it stops emitting, but doesn't tear down the Observable, so not quite what you have there. @jhusain am I correct here?

@jhusain
Copy link

jhusain commented Dec 2, 2016 via email

@benlesh
Copy link
Member Author

benlesh commented Apr 2, 2018

I think we're going to have to target this for v7. It's an important change, but it will incur a lot of breakage in the community I think.

@benlesh benlesh closed this as completed May 4, 2021
@ReactiveX ReactiveX locked and limited conversation to collaborators May 4, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants