title: Error messages returned from Web API method are omitted in non-dev environment
body: <p>I have a Web API controller POST method that behaves fine locally and on the testing server. If everything goes well it returns:</p>
  
  <pre><code>new HttpResponseMessage( HttpStatusCode.Created )
  </code></pre>
  
  <p>If something goes wrong, it returns:</p>
  
  <pre><code>new HttpResponseMessage&lt;IEnumerable&lt;string&gt;&gt;( usefulMessages, HttpStatusCode.BadRequest );
  </code></pre>
  
  <p>The problem is that when I make a request to the testing server that results in an error, I get the bad request code back but I never see the messages. If I make the exact same request to my local machine, I do see the messages. The following outputs are from my own tool:</p>
  
  <p>Sending a request to my local machine I get:</p>
  
  <pre><code>Status code: 400 (BadRequest)
  Response data: ["Error message one", "Error message two"]
  </code></pre>
  
  <p>Sending a request to the testing server I get:</p>
  
  <pre><code>Status code: 400 (BadRequest)
  Response data: Bad Request
  </code></pre>
  
  <p>The code that is running is exactly the same. The database is the same. Everything is the same except for the server servicing the request. I even have code to email myself the error messages so I know that the server is producing the correct error messages and behaving correctly. Could this be an IIS thing (like the equivalent of customErrors = RemoteOnly for Web API)? Not only are the error messages omitted from the response data, something invents the phrase "Bad Request" to put in there instead.</p>
  
  <p>Any ideas? Thanks.</p>