title: How do I catch unhandled exceptions in ASP .NET Core 2.0 before the page is rendered?
body: <p>I am trying to integrate <a href="http://sentry.io" rel="nofollow noreferrer">sentry</a> into my asp .net core app. I can't seem to find a straight answer how to catch the exception before the server throws 500 in asp net core 2.0.</p>
  
  <p>I've searched official docs. Non-development mode.</p>