title: Custom exception handling in ServiceStack REST service
body: <p>I have a ServiceStack REST service and I need to implement custom error handling. I've been able to customize service errors by setting AppHostBase.ServiceExceptionHandler to a custom function. </p>
  
  <p>However, for other types of errors, such as validation errors, this doesn't work. How can I cover all cases?</p>
  
  <p>In other words, I'm trying to achieve two things:</p>
  
  <ol>
  <li>Set my own HTTP status codes for every kind of exception that might pop up, including non-service errors (validation)</li>
  <li>Return my own custom error object (not the default ResponseStatus) for every error type</li>
  </ol>
  
  <p>How would I go about achieving this?</p>