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

ReplaySubject.asObservable with thrown error in next after subscribing #2565

Closed
repkins opened this issue Apr 19, 2017 · 4 comments · Fixed by #2626
Closed

ReplaySubject.asObservable with thrown error in next after subscribing #2565

repkins opened this issue Apr 19, 2017 · 4 comments · Fixed by #2626

Comments

@repkins
Copy link

repkins commented Apr 19, 2017

Hello!

I have faced with issue regarding of ReplaySubject asObservable() returning Observable behavior. I have a ReplaySubject instance, from which have "extracted" Observable-like instance with method asObservable(). While Observable instance has no any subscribers, observable instance ReplaySubject instance have received one notiication using .next(...). When i do subscribe with function, where has throw ... error, then unexpectly it silently swallows error instead of re-throwing it.

Code below:

let subject = new ReplaySubject<boolean>();
let obs$ = subject.asObservable();

subject.next(true);

obs$.subscribe(() => {
  throw new Error('Error thrown in subscriber')
});

RxJS version: 5.2.0

@kwonoj
Copy link
Member

kwonoj commented Apr 19, 2017

maybe it's same as #2564? I thought in #2564 it's shallowed by jasmine, seems not.

@repkins
Copy link
Author

repkins commented Apr 19, 2017

No, there is not being used jasmine.

@kwonoj
Copy link
Member

kwonoj commented Apr 19, 2017

yes, that's what I mean. I originally thought it's jasmine, and since your issue isolated it I came to think #2564 is not jasmine side issuen basically this 2 issues looks same to me. @repkins

@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

Successfully merging a pull request may close this issue.

2 participants