title: What HTTP status code should be returned when given an invalid ID?
body: <p>What status code should be returned for a request to delete an object that doesn't exist?</p>
  
  <pre><code>public ContentResult DeleteEntity(int id, FormCollection FormData)
  {
      Database db = new Database();
      TargetEntity te = db.TargetEntities.SingleOrDefault(t =&gt; t.Id == id);
      if(te == null)
      {
          Reponse.StatusCode = 400; //Is this correct?
          return Content("Deletion failed. Invalid ID: " + id);
      }
      //Delete the entity
      return Content("Successfully Deleted");
  }
  </code></pre>
  
  <p>The request itself is fine, it just happens that the specified ID is invalid (or the item is already deleted), so I'm unsure about the 400 range. I'm pretty sure the 500 codes are even less-suited to this, since nothing went wrong on the server (it was just asked to delete something that doesn't exist).</p>
  
  <p>What status code is most appropriate here?</p>