Open
Description
Description
Errors in hold streams are not logged
Steps to Reproduce the Issue
Check stackblitz example
this.hold(
of(null).pipe(switchMap(() => throwError("error"))),
value => {
console.log(value);
}
);
Result in console:
Expected result in console:
error
Solution
Add console.error in hold definition
hold<S>(
obsOrObsWithSideEffect: Observable<S>,
sideEffectFn?: (arg: S) => void
): void {
const sideEffect = obsOrObsWithSideEffect.pipe(catchError(e => {
console.error(e)
return EMPTY
}))
if (typeof sideEffectFn === 'function') {
this.effectObservable.nextEffectObservable(
sideEffect.pipe(tap(sideEffectFn))
);
return;
}
this.effectObservable.nextEffectObservable(sideEffect);
}
Metadata
Metadata
Assignees
Labels
No labels