How to return HTTP 500 from ASP.NET Core RC2 Web Api?
<p>Back in RC1, I would do this:</p>
<pre><code>[HttpPost]
public IActionResult Post([FromBody]string something)
{    
    try{
        // ...
    }
    catch(Exception e)
    {
         return new HttpStatusCodeResult((int)HttpStatusCode.InternalServerError);
    }
}
</code></pre>
<p>In RC2, there no longer is <code>HttpStatusCodeResult</code>, and there is nothing I can find that lets me return a 500 type of IActionResult.</p>
<p>Is the approach now entirely different for what I'm asking? Do we no longer try-catch in <code>Controller</code> code? Do we just let the framework throw a generic 500 exception back to the API caller? For development, how can I see the exact exception stack?</p>