title: Postman - how to get "message" when POST request returns 400 Error
body: <p>I have a POST request in Postman, with the following test</p>
  
  <pre><code>pm.test("CREATED - Status code is 201", function () {
      pm.response.to.have.status(201);
  });
  
  var namespaceLink = postman.getResponseHeader("Location");
  var namespaceId = namespaceLink.substring(namespaceLink.lastIndexOf('/') + 1);
  
  pm.environment.set("IdOfNamespace", namespaceId);
  </code></pre>
  
  <p>The request is failing with "400 Bad Request". 
  In this case, I would expect that Test fails with something like "Expected 201 but got 400", but the test is failing with following "<em>There was an error in evaluating the test script:  TypeError: Cannot read property 'substring' of undefined</em>" 
  I also receive the following message in the response body: "<em>Namespace 'AUTO_NS' is already using this code</em>"</p>
  
  <p>Since the request is run as part of the automated test (with a lot of requests) and then generate a report, I would like to set up the test the way it will be more clear in the report on the reason of the failure. I.e. message from response body.</p>
  
  <p>Can you please help me on how I can do it (as part of the test)? </p>