title: Catch error in combined pipe of pipeable rxjs operators
body: <p>We've just upgraded one of our applications to Angular 5, and started to transition into <a href="https://github.com/ReactiveX/rxjs/blob/master/doc/lettable-operators.md" rel="noreferrer">lettable operators</a> as introduced in rxjs v5.5.</p>
  
  <p>Because of this, we have rewritten our observable pipelines to the new syntax with the <code>.pipe()</code> operator.</p>
  
  <p>Our previous code would look like this, with a <code>.catch()</code> inside the <code>.switchMap()</code> as to not interrupt the running of effects if an error is thrown.</p>
  
  <pre><code>@Effect()
  loadData$ = this.actions$
  .ofType(LOAD_DATA)
  .map((action: LoadData) =&gt; action.payload)
  .withLatestFrom(this.store.select(getCultureCode))
  .switchMap(([payload, cultureCode]) =&gt; this.dataService.loadData(payload, cultureCode)
    .map(result =&gt; {
      if (!result) {
        return new LoadDataFailed('Could not fetch data!');
      } else {
        return new LoadDataSuccessful(result);
      }
    })
    .catch((err, caught) =&gt; {
      return Observable.empty();
    });
    );
  </code></pre>
  
  <p>In the case of an error thrown in the call to the <code>dataService</code> it would be caught and handled (simplified the error handling here).</p>
  
  <p>With the new syntax and use of <code>.pipe()</code>, we now have this</p>
  
  <pre><code>@Effect()
  loadData$ = this.actions$
  .ofType(LOAD_DATA)
  .pipe(
    map((action: LoadData) =&gt; action.payload),
    withLatestFrom(this.store.select(getCultureCode)),
    switchMap(([payload, cultureCode]) =&gt; this.dataService.loadData(payload, cultureCode)),
    map(result =&gt; {
      if (!result) {
        return new LoadDataFailed('Could not fetch data!');
      } else {
        return new LoadDataSuccessful(result);
      }
    })
    );
  </code></pre>
  
  <p>How can I in a similar fashion catch any thrown errors in the observable pipeline, using the new syntax?</p>