title: How to stop error propagation in an Angular interceptor
body: <p>I have a http interceptor in my Angular app:</p>
  
  <pre><code>@Injectable()
  export class ResponseInterceptor implements HttpInterceptor {
  
    constructor(private messageService: MessageService) {}
  
    intercept( req: HttpRequest&lt;any&gt;, next: HttpHandler ): Observable&lt;HttpEvent&lt;any&gt;&gt; {
      return next
        .handle( req ).pipe(
          tap(event =&gt; {
            if (event instanceof HttpResponse) {
              Logger.log('Successful HTTP request in interceptor');
            }
          }, (error: any) =&gt; {
            const notFoundError = ErrorCodes.getErrorDescription(error.status);
            if (notFoundError) {
              this.messageService.show(errorMessage);
            } else {
              return Observable.throw( error );
            }
  
          }
        ));
    }
  }
  </code></pre>
  
  <p>When there is a notFoundError, my app correctly shows the message I want, but it seems the error propagates back to the error handler in the service and I get a 
  "ERROR Error: Uncaught (in promise): HttpErrorResponse" in the console. Is there a way to stop errors in an interceptor? </p>
  
  <p>I mean I would handle common errors here and only propagate others back to the services.</p>