title: When to display "Record Not Found" Page or return HTTP 404?
body: <p>I am sure people have many different opinions on this.<br>
  I want to know how other developers think about handling this scenario.</p>
  
  <h3>Pre-Condition</h3>
  
  <p>The web application/service requires authentication (i.e., the user needs to be logged in).<br>
  It is not publicly accessible.</p>
  
  <hr>
  
  <h3>Web Application Scenario</h3>
  
  <p><strong>Example URL:</strong> <code>~/PurchaseOrder/View/1234</code></p>
  
  <ol>
  <li>Purchase Order record does NOT exist in the database.</li>
  <li>Purchase Order record exists, but the user does NOT have permission to view due to some business requirements.  </li>
  </ol>
  
  <p>How do you decide between the following two options:</p>
  
  <ul>
  <li>Display Purchase Order Not Found web page with HTTP 200.</li>
  <li>Sets the response status to HTTP 404 Not Found and redirect to a generic 404 error page.</li>
  </ul>
  
  <hr>
  
  <h3>Web Service API Scenario</h3>
  
  <p>Lets say the Purchase Order record is retrievable from a web service in JSON format.<br>
  Obviously, the API would return HTTP 404 if the record does not exist.  </p>
  
  <p>But how should it respond when the user does not have permission to view that particular Purchase Order record? Sets response code to 404 and return an error message in JSON???</p>
  
  <p>Thanks!</p>