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

Errors in Observable.create arg not caught #1833

Closed
matthewwithanm opened this issue Jul 16, 2016 · 4 comments · Fixed by #2313
Closed

Errors in Observable.create arg not caught #1833

matthewwithanm opened this issue Jul 16, 2016 · 4 comments · Fixed by #2313
Assignees
Labels
bug Confirmed bug

Comments

@matthewwithanm
Copy link

RxJS version:

5.0 beta 10

Code to reproduce:

Observable.create(() => { throw new Error('oops'); }).subscribe({error: _ => console.log('got it')});

Expected behavior:

> got it

Actual behavior:

Error: oops

Additional information:

Rx 4 exhibits the expected behavior here (catching the error and sending it to the observer).

cc @hansonw

@trxcllnt
Copy link
Member

@matthewwithanm hm, good catch. I think I can get a PR for this ready soon.

@benlesh benlesh self-assigned this Jan 29, 2017
jayphelps pushed a commit that referenced this issue Jan 29, 2017
…ent down error channel (#2313)

- Fixes `Observable.create(fn)` and `new Observable(fn)` such that any error thrown in `fn` on subscription will be sent to the subscriber's error handler.
- Fixes a subject test that was relying on the errant behavior.

fixes #1833
@wbinnssmith
Copy link
Contributor

hi! I can still reproduce this with the latest stable RxJS as of now (5.4.3). Is d4a9aac a breaking change targeted at 6.0 only or will this patch land in v5 at some point?

@trxcllnt
Copy link
Member

trxcllnt commented Sep 6, 2017

@wbinnssmith I would expect this should go out in a patch release. @benlesh thoughts? I saw @jayphelps' PR went into master, so did it already go out?

@lock
Copy link

lock bot commented Jun 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Confirmed bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants