title: HTTP response always return response code 200 even request fail, and return status code is part of REST
body: <p>I recently joined a new project. In this project, all APIs in service always return status code 200. Even, if that response was should be 400 or 404, the API returns status code 200. </p>
  
  <p>I asked the reason why APIs don't return other response codes, and programmers told me they don't use response code. they put information in the body. </p>
  
  <p>for example, there are some missing required fields, they return response status code 200, but the body returns like this  </p>
  
  <pre><code>{"result" : "fail"}
  </code></pre>
  
  <p>if an unauthorized user tries to access, the status code is 200, the body returns like this </p>
  
  <pre><code>{"result" : "unautherized"}
  </code></pre>
  
  <p>what I did before was very different, I always specified status code by cases and try to return suitable status code and message. I thought that this is the part of the HTTP protocol. However, they told me specifiying status code like 400, 404, 300, is part of RESTful API, and returning always 200 is the right status code because the server responded and it is alive. APIs, always have to return 200 except 500. Because when the server dies, it can't return anything. </p>
  
  <p>So these are the question.</p>
  
  <ol>
  <li>The server should always return status code 200 except the server dies?</li>
  <li>Specifying various status code is the part of REST API?</li>
  <li>Not using status code is common?</li>
  </ol>