title: Angular2 http response body on error
body: <pre><code>this.http.put(url, data)
      .map(response =&gt; response.json())
      .subscribe(
        response =&gt; console.log(response),
        error =&gt; console.log(error),
      );
  </code></pre>
  <p>On success it outputs the data returned from the API. On error the output is ProgressEvent with status of 0.</p>
  <h3>How to get the response data from the API when error occurs?</h3>