title: Angular 6 - HTTP Interceptor and net :: ERR_TIMED_OUT
body: <p>The question I have is for something I've been scratching my head about recently -- </p>
  
  <p>In my interceptor, I have code that parses and handles certain errors, and will act in certain ways depending on an error's status code, etc (I didn't include this code due to it not really serving any purpose to this question, but if someone has a good reason as to why I should include it, I absolutely can.</p>
  
  <p>I am trying to figure out how to handle <code>net :: ERR_TIMED_OUT</code> (Using google chrome / opera) in my interceptor. I've tracked it down to a point where I can tell that a request IS being built and being 'handled', but after that, the request and response are both gone. My initial thought here is that there is an <code>XMLHttpRequest</code> error somewhere and it is being suppressed in some way and the response is being thrown out.</p>
  
  <pre><code>intercept(req: HttpRequest&lt;any&gt;, next: HttpHandler): Observable&lt;HttpEvent&lt;any&gt;&gt; {
      const intercepted = this.setHeaders(req);
      return this.SetPendingRequests(next.handle(intercepted))
              .pipe(catchError((err): Observable&lt;HttpEvent&lt;any&gt;&gt; =&gt; {
                  return this.ParseErrorResponse(err);
              }));
  }
  </code></pre>
  
  <p>I've tried adding <code>finalize(() =&gt; {})</code> to it as well and that works fine in every case except for this one, where <code>ERR_TIMED_OUT</code> just basically seems to decide that all things must stop for it.</p>
  
  <p>I've also tried hooking into <code>XMLHttpRequest</code> directly and angular didn't take that too kindly - as I feel the root of the problem could stem from that itself.</p>
  
  <p>All google/stackoverflow searches pretty much point to it being a local issue, but I feel as if there should be some way to handle it in my code so if a user were to run into this error while using my app, I'd be able to handle that appropriately. Basically, I just want any request for <code>ERR_TIMED_OUT</code> (which oddly enough, other browser base errors return an error of 'Unknown Error' type -- this is the only odd outlier I've found that just simply stops everything. I'm looking to see if anyone else has run into this issue / would be willing to help aid me in sniffing it out.</p>
  
  <p>Appreciate any help on the matter and thanks in advance,</p>