title: Response.TrySkipIisCustomErrors equivalent for asp.net core?
body: <p>How to prevent IIS from overriding custom error pages with IIS default error pages? Is there a Response.TrySkipIisCustomErrors equivalent for asp.net core?
  In ASP Net MVC I use the code below to send error without a custom page but in asp net core it is not working.</p>
  
  <pre class="lang-cs prettyprint-override"><code>try
  {
      // some code
  }
  catch (Exception ex)
  {
      Response.TrySkipIisCustomErrors = true;
      Response.StatusCode = (int)HttpStatusCode.InternalServerError;
      mensagem = ex.Message;
  }
  </code></pre>