Angular 4 : get error message in subscribe : <p>In the service, there is this code :</p>

<pre><code>  getUser(id){
    return this.http.get('http:..../' + id)
      .map(res =&gt; res.json());
  }
</code></pre>

<p>In the component : </p>

<pre><code>this.myService.getUser(this.id).subscribe((customer) =&gt; {
  console.log(customer);
  this.customer = customer,
  (err) =&gt; console.log(err)
});
</code></pre>

<p>When it's the 'customer' exist, no problem I get all the information about the customer.</p>

<p>When the id does not exist, the web api return 'BadRequest' with a message. How can I get this message ? the status ?</p>

<p>Thanks,</p>
