From 673a5bdc0b1267d9b950d1ea79b616d2c6265572 Mon Sep 17 00:00:00 2001 From: Nicholas Jamieson Date: Tue, 4 Sep 2018 22:00:49 +1000 Subject: [PATCH] fix(subscribe): don't swallow internal errors Closes #3803 --- src/internal/Observable.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/internal/Observable.ts b/src/internal/Observable.ts index d9e8f0c0d57..06ca0dd38ae 100644 --- a/src/internal/Observable.ts +++ b/src/internal/Observable.ts @@ -2,6 +2,7 @@ import { Operator } from './Operator'; import { Subscriber } from './Subscriber'; import { Subscription } from './Subscription'; import { TeardownLogic, OperatorFunction, PartialObserver, Subscribable } from './types'; +import { reportError } from './util/reportError'; import { toSubscriber } from './util/toSubscriber'; import { iif } from './observable/iif'; import { throwError } from './observable/throwError'; @@ -226,7 +227,7 @@ export class Observable implements Subscribable { sink.syncErrorThrown = true; sink.syncErrorValue = err; } - sink.error(err); + reportError(err, sink); } }