title: catch api 404 response with Angular2 http
body: <p>I have api which returns 400 or 404 errors if failed. </p>
  
  <p>When I run the http.get method, it does not catch the error on subscribe and throws error. </p>
  
  <pre><code>Http.get(`api/path/here`).map(res =&gt; res.json()).subscribe(
              data =&gt; console.log(data),
              error =&gt; console.log(error)
          );
  </code></pre>
  
  <p>Following is the error I get</p>
  
  <p><a href="https://i.stack.imgur.com/KEZxE.png" rel="noreferrer"><img src="https://i.stack.imgur.com/KEZxE.png" alt="enter image description here"></a></p>