title: ELMAH and API controller in MVC4 not logging errors
body: <p>Using an API controller in MVC4, when the controller action throws an exception, ELMAH does not log the error.</p>
  
  <p>I think the problem is that MVC4 sets the HTTP status code to 500, and it returns the exception details in a JSON object, but it does not throw an unhandled exception so ELMAH never sees it.</p>
  
  <p>How can I get ELMAH to capture all responses where the status code is not 200?</p>