rxjs icon indicating copy to clipboard operation
rxjs copied to clipboard

When exception is thrown in resultSelector function of forkJoin error is not propagated to subscriber.

Open mihailssh opened this issue 8 years ago • 2 comments

When exception is thrown in resultSelector function of forkJoin error is not propagated to subscriber. I am not sure if it is normal behaviour or a bug?

RxJS version: 5.5.6

Code to reproduce:

Observable.forkJoin(
    Observable.of(1),
    Observable.of(2),
    (i, buffer) => {
        throw new Error('error');
    }).catch((error) => {
        return Observable.of(3);
    }).subscribe(console.log,
    (error) => {
        console.log('error!');
    });

Expected behavior: to catch the error and print : error!

Actual behavior: node_modules/rxjs/Observable.js:165 throw sink.syncErrorValue;

Additional information:

mihailssh avatar Jan 07 '18 01:01 mihailssh

Confirmed. Thank you for reporting this @mihailstefanov

benlesh avatar Jan 24 '18 23:01 benlesh

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[bot] avatar Jun 06 '18 02:06 lock[bot]