title: Easiest way to convert HttpResponseMessage to HttpActionResult outside of a controller
body: <p>Implementing <code>IExceptionHandler</code>, the result is expecting <code>IHttpActionResult</code>, but <code>createResponse</code> is returning <code>HttpResponseMessage</code>. I would like to simply create a response message from the request context. It does content negotiation and I would prefer using something that already exists, instead of creating a custom model implementing IHttpActionResult myself. </p>
  
  <p>Controllers have access to helpers to easily make HttpResponseMessage into HttpActionResult, but there's nothing that I can find outside of the controller. What is my best option here?</p>
  
  <pre><code>var myCustomException = context.Exception as MyCustomException;
  
  if (myCustomException != null)
  {
     context.Result = context.Request.CreateResponse(myCustomException.StatusCode, 
                                                     myCustomException.Error);
     return;
  }
  
  context.Result = context.Request.CreateResponse(HttpStatusCode.InternalServerError, 
                                                  new MyCustomError("Something went wrong"));
  </code></pre>