title: How to deal with Observable 'Cannot read property 'ngOriginalError' of undefined'
body: <p>I have created a service which handles HTTP calls and returns the response to the caller only if the result is successful.</p>
  
  <p>I'm using Angular observable  Map operator to check the result and status code and if the response does not have desired output then it should stop the observer pipeline after throwing a custom error message, which is being caught in catchError block which is working but at the same time getting uncaught Error in the console.</p>
  
  <p><strong>Angular version - 5+, Rxjs version- 5+</strong></p>
  
  <pre><code>fetchRecords(): Observable &lt; any &gt; {
    return this.httpService.getData('cmpgnInfo/outlets').pipe(
      map((response: any) =&gt; {
        if (response[0].status !== 'ERROR') {
          throw new Error('Not able to details.');
        }
        return response[0].results;
      }),
      catchError(err =&gt; Observable.throw(this.showError('Outlets', err)))
    );
  }
  
  showError(logString: string, message ? : string) {
    this.logService.error(`Failed to load ${logString}`);
    this.modalService.showErrMessage(message);
  }
  </code></pre>
  
  <p>how to deal with this Subscriber uncaught error? what is wrong with the code which is causing this.</p>
  
  <blockquote>
    <p>Subscriber.js:247 Uncaught TypeError: Cannot read property
    'ngOriginalError' of undefined
            at getOriginalError (core.js:1430)
            at ErrorHandler._findOriginalError (core.js:1548)
            at ErrorHandler.handleError (core.js:1505)
            at Object.next (core.js:5508)
            at SafeSubscriber.schedulerFn [as _next] (core.js:4342)
            at SafeSubscriber.__tryOrUnsub (Subscriber.js:243)
            at SafeSubscriber.next (Subscriber.js:190)
            at Subscriber._next (Subscriber.js:131)
            at Subscriber.next (Subscriber.js:95)
            at EventEmitter.Subject.next (Subject.js:56)
            at EventEmitter.emit (core.js:4322)
            at eval (core.js:4782)
            at ZoneDelegate.invoke (zone.js:334)
            at Zone.run (zone.js:126)
            at NgZone.runOutsideAngular (core.js:4708)</p>
  </blockquote>