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

Observable.throw doesn't throw the error when used inside Observable.fromPromise().catch() #2485

Closed
rrhvella opened this issue Mar 21, 2017 · 2 comments

Comments

@rrhvella
Copy link

RxJS version: 5.2.0

Code to reproduce:

Refer to the following two fiddles:
RxJS 5.2.0
RxJS 5.0.1

Expected behavior:

In both examples I expect there to be an unhandled error.

Actual behavior:

There is only an unhandled error if version 5.0.1 is used, subsequent versions do not seem to behave this way, including the latest version.

Additional information:

I have global error handlers in my javascript code

If I have code inside a promise, inside an observable, then perform some error handling using .catch and throw any errors I don't want to handle using Observable.throw, then the errors I throw again do not reach my global error handlers. It's as if an error wasn't thrown at all.

Actually throwing the error instead of using Observable.throw actually works, however this is not ideal, as I think Observable.throw is supposed to throw the error again. It certainly does when fromPromise isn't used, as show in this fiddle.

@kwonoj
Copy link
Member

kwonoj commented May 29, 2017

Closing via #2552.

@kwonoj kwonoj closed this as completed May 29, 2017
@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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants