title: Angular 5 - Cannot resolve observable in Observable.catch()
body: <p>My first time here, I hope that you can help me.</p>
  
  <p>I'm trying to create a response interceptor on Angular 5. I want to handle responses with status [202] successfully.</p>
  
  <p>I'm doing a call to a webservice, the interceptor is working well it catches the error. If I return Observable.throw('') this will arrive to the error function on subscribe, but when I try to return a new Observable to resolve the exception, it is not arriving on success method of subscribe.</p>
  
  <p>The interceptor code:</p>
  
  <pre><code>import {Injectable} from '@angular/core';
  import {HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, 
  HttpRequest, HttpResponse} from '@angular/common/http';
  import {Observable} from 'rxjs/Rx';
  
  
  @Injectable()
  export class Handle2xxResponseInterceptor implements HttpInterceptor{
  
   intercept(req: HttpRequest&lt;any&gt;, next: HttpHandler): 
   Observable&lt;HttpEvent&lt;any&gt;&gt; {
  
     return next.handle(req).catch(error =&gt; {
       if (error instanceof HttpErrorResponse) {
         if (error.status === 202) {
          return Observable.of(error); // or return Observable.empty();
         }
       }
       return Observable.throw(error);
     });
   }
  }
  </code></pre>
  
  <p>Thank you people.</p>