title: Rest error message in HTTP Header or Response Body?
body: <p>I have a REST service that is exposed to iPhone and Android clients. Currently I follow the HTTP codes 200, 400, 401, 403, 404, 409, 500 etc.</p>
  
  <p>My question is where is the recommended place to put the reason/description/cause of the error? Does it make more sense for the REST API to always have custom Reason in the header like so?</p>
  
  <pre><code>&lt; HTTP/1.1 400 Bad Request - Missing Required Parameters.
  &lt; Date: Thu, 20 Dec 2012 01:09:06 GMT
  &lt; Server: Apache/2.2.22 (Ubuntu)
  &lt; Connection: close
  &lt; Transfer-Encoding: chunked
  </code></pre>
  
  <p>Or is it better to have it in the Response Body via JSON? </p>
  
  <pre><code>&lt; HTTP/1.1 400 Bad Request
  &lt; Date: Thu, 20 Dec 2012 01:09:06 GMT
  &lt; Server: Apache/2.2.22 (Ubuntu)
  &lt; Connection: close
  &lt; Transfer-Encoding: chunked
  &lt; Content-Type: application/json
  { "error" : "Missing Required Parameters" }
  </code></pre>