title: Error Handling in Web Api Self Hosted Server for ActionFilterAttribute
body: <p>I have a project running ASP.Net WebApi in a self hosted configuration and I am using an <code>ActionFilterAttribute</code> class as a filter for some security checks and an <code>ExceptionFilterAttribute</code> as the exception handling class.</p>
  
  <p>When I raise an exception in my <code>ApiController</code> of type <code>HttpResponseException</code> it is being ignored by the <code>ExceptionFilterAttribute</code> class as expected. </p>
  
  <p><strong>The issue is</strong> that when i raise an exception of type <code>HttpResponseException</code> in the security filter of type <code>ActionFilterAttribute</code> it <strong>is</strong> being caught by the <code>ExceptionFilterAttribute</code> class.</p>
  
  <p>When debugging I have found that that exception is being changed to</p>
  
  <blockquote>
    <p>Processing of the HTTP request resulted in an exception. Please see
    the HTTP response returned by the 'Response' property of this
    exception for details.</p>
  </blockquote>
  
  <p>What can I do to prevent this behavior.</p>