title: Angular 4 omitting HTTP error codes
body: <p>I have an api call like this:</p>
  
  <pre><code>        this.http.get(url)
              .subscribe(results =&gt; {
                  ...
              }, (err: any) =&gt; {
                  console.log('raw error =&gt;', err);
          });
  </code></pre>
  
  <p>The error on Chrome shows <code>502 (Bad Gateway)</code>, but the error returned from Angular shows <code>status = 0</code>, I would like to show message to the user when this error occurs, but how could I  correctly catch the http errors?</p>
  
  <p><a href="https://i.stack.imgur.com/6lzhN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6lzhN.png" alt="enter image description here"></a></p>