title: JavaScript/jQuery and PHP Ajax force an error
body: <p>Is it possible to force an error state to return to an ajax request from a PHP script?</p>
  
  <p>I am handling the success and error states in an ajax request and I want a way to force the error.  The error only seems to be triggered by xhttp error and I want to trigger this when a condition is not met at the server.  Its seems confusing to have to return success and have to actually put a flag in the response for an error</p>