title: Angular 4 Http missing response text when status code = 400
body: <p>I'm using Angular Http like this:</p>
  
  <pre><code>this.http
      .post(url, JSON.stringify(data), this.createOptions())
      .subscribe(response =&gt; {
               ... do something
          }, error =&gt; {
              if (error.status === 400){
                  ...do something
              }
              else if (error.status === 500) {
                  ...do something else                                    
              }
          }),
      }
  </code></pre>
  
  <p>The problema is that when I get a <code>400</code> error code, the server returns me the error message as a <code>string</code> in the body. But this seems to disappear when the response goes to the <code>catch</code> block. The server response is arriving correctly, I'm testing it with Postman, but in angular, the body is replaced with something else. If I use <code>error.text()</code> I get this, instead of the error message:</p>
  
  <pre><code>"_body": {
      "__zone_symbol__currentTask": {
          "type": "microTask",
          "state": "notScheduled",
          "source": "Promise.then",
          "zone": "angular",
          "invoke": "invoke()function () {_numberOfNestedTaskFrames++; try { self.runCount++; return self.zone.runTask(self, this, arguments);\n                    }\n                finally {\n                    if (_numberOfNestedTaskFrames == 1) {\n                        drainMicroTaskQueue();\n                    }\n                    
  _numberOfNestedTaskFrames--;\n                }\n            }",
          "cancelFn": null,
          "runCount": 0,
          "callback": "callback()function () {\n            try {\n                resolvePromise(chainPromise, true, zone.run(delegate, undefined, 
  [promise[symbolValue]]));\n            }\n            catch (error) {\n                resolvePromise(chainPromise, false, error);\n            }\n        }"
      }
  },
  </code></pre>
  
  <p>What am I doing wrong?</p>