title: handle HTTP status codes in Angular 5
body: <p>I'm trying to capture http status codes in angular in service which calls a backend service, i'm facing issues as i see status 204 , but when logging angular show status null, here is what i'm doing in my service:</p>
  
  <pre><code>return this.http.get&lt;JSON&gt;(mybackendsserviceurl)
        .do(res =&gt; {
        })
        .catch(res =&gt; {
          return this.handleError(res);
        });
    }
  
    private handleError(err: HttpErrorResponse) {
      console.log(err.message);
      return Observable.throw(err.message);
    }
  </code></pre>
  
  <p>How to catch different errors from backend service, like 204,403,404,500...etc and display a user friendly message for each error?
  my frontend is calling the service from API gateway and i'm setting the errors in Response Integrations.</p>