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

fix(subscribeToResult): throw error in subscriber with inner observable #2796

Merged
merged 2 commits into from
Aug 17, 2017

Conversation

kwonoj
Copy link
Member

@kwonoj kwonoj commented Aug 14, 2017

Description:
#2626 fixed error to be thrown when observable have sources, but it doesn't cover cases of inner observable with subscribeToResult as it doesn't have sources. This PR explicitly sets subscriber's syncErrorThrowable for inner observables, let exception in subscribers correctly thrown with inner observables as well.

Related issue (if exists):

@kwonoj
Copy link
Member Author

kwonoj commented Aug 14, 2017

I believe this is patch as it fixes regressions.

@rxjs-bot
Copy link

rxjs-bot commented Aug 14, 2017

Messages
📖

CJS: 3175.9KB, global: 589.0KB (gzipped: 108.6KB), min: 138.0KB (gzipped: 29.1KB)

Generated by 🚫 dangerJS

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0003%) to 97.736% when pulling d7bffa9 on kwonoj:fix-shallow-error into 74ff463 on ReactiveX:master.

@jayphelps
Copy link
Member

Do you have cycles to add a test case? Dunno if this is truly minimum but it reproduces it:

const input$ = new Rx.Subject();

input$
  .mergeMap(() => Rx.Observable.of(1, 2))
  .subscribe(d => {
    throw new Error('some error');
  });

input$.next();

@kwonoj
Copy link
Member Author

kwonoj commented Aug 14, 2017

@jayphelps I've used given snippet to verify behavior. Have to think a bit for test cases.

@kwonoj
Copy link
Member Author

kwonoj commented Aug 14, 2017

@jayphelps test case updated.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0003%) to 97.736% when pulling 731be99 on kwonoj:fix-shallow-error into 74ff463 on ReactiveX:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0003%) to 97.736% when pulling c935bf5 on kwonoj:fix-shallow-error into 74ff463 on ReactiveX:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0003%) to 97.736% when pulling c935bf5 on kwonoj:fix-shallow-error into 74ff463 on ReactiveX:master.

@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 this pull request may close these issues.

subscribe onError swallows any exception thrown
5 participants