title: Respond 200 with error or the response code as the error code
body: <p>So, being a developer I have a very basic question, in a <strong>REST standard</strong> we have <strong>100's of error code for specific reason</strong> like:</p>
  
  <ol>
  <li>4xx if resource related </li>
  <li>5xx if exception occurred in server</li>
  </ol>
  
  <p>and many more.</p>
  
  <p>Now when it comes to the implementation there are situations when we <strong>return 404 directly</strong> as the <strong>response status code</strong> <strong>with the error message in the response body</strong>. With this approach there is a thing that I think a bit confusing, what <strong>if the URI itself is never being made</strong>, that means <strong>suppose /a/b is not implemented</strong> and being any server they respond 404, and <strong>as a client</strong> they check the code and say that the <strong>user</strong> is not found if they are searching for the user with this API. </p>
  
  <p>Instead what I feel (correct me if I am wrong) is that <strong>if the call is successfully completed in the server</strong> (without any exceptions and errors) we return 200 and in the response body return in a specific format like:</p>
  
  <pre><code>{
     "status" : boolean, // if the overall call succeeded
     "message" : string, // message from server
     "code" : integer, // code, http code or business level code 
     "data" : object,//actual data
     "type" : string, // type of the data like object, basic, array,  (basically a value from enum)
  }
  </code></pre>
  
  <p>The response code of any call will always be 200, with the specific code being available in <strong>code</strong> key of the response format.</p>
  
  <p>Now coming to the usage of these REST call from client prospective, in the client whether it is <strong>browser, IOS, Android or Desktop app</strong>, we call the API and <strong>check for 200</strong> as the <strong>Response code</strong> and all our further functionality will be dependent on <strong>status</strong> &amp; <strong>code</strong> key of the response body itself. Again <strong>if the Response Code itself is not 200</strong> then that it actually the problem with respect to the server. </p>
  
  <p>Coming to the SDK implementations of the API's, we can do the same inside of them, by always checking the <strong>status</strong> and <strong>code</strong> if Response Code is 200, and rejecting directly non 200 Response Codes.</p>
  
  <p>I feel with this approach the client side as well as SDK side the implementation would be more generic and straight forward.</p>
  
  <p>Please correct me if I am wrong? Please shed some views.</p>
  
  <p>Thanks in advance.</p>