title: Map http error response
body: <p>Is there a way to map not only the successful response but also the error?</p>
  
  <p>I want to get a modified error in the subscribe function</p>
  
  <pre><code>request.subscribe(
      response =&gt; {
          this.user = response;
      },
      error =&gt; {
          this.error = error;
      }
  );
  </code></pre>
  
  <p>I already tried this</p>
  
  <pre><code>let request = this.http.put(url, JSON.stringify(user))
  .map(
      response =&gt; response.json(),
      error =&gt; this.handleError(error) // returns a string
  );
  </code></pre>
  
  <p>but <code>handleError</code> is never getting executed.</p>
  
  <p>Thanks in advance.</p>