title: Angular 8 - How to intercept an http error inside a from (rxjs)?
body: <p>My interceptor looks like follows:</p>
  
  <pre><code>intercept(request: HttpRequest&lt;any&gt;, next: HttpHandler): Observable&lt;HttpEvent&lt;any&gt;&gt; {
      let tokenPromise = this.storage.get('token');
  
      return from(tokenPromise).pipe(mergeMap(token =&gt; {
        let data = {
          headers: request.headers.set('MyToken', token)
        };
        let newReq = request.clone(data);
        return next.handle(newReq);
      }));
  
  }
  </code></pre>
  
  <p>How can I also intercept 404 errors?</p>