I have an ASP.Net Core 2 web api project.
I have added the following to the Configure method in my Startup.cs file
app.UseExceptionHandler();
I noticed in my Postman tests that I was getting an "Unable to get response" result. Server-side logging shows that the error has to do with Tables being missing from my Database. Which is fine, I can resolve that. But my question is why would the server not be returning a 500 Internal Server Error? Why is it dying, and returning no response at all to Postman?
So, in my Controller, I purposely throw an Exception to test the handler, and call the URL from Postman, and indeed, I get back a 500 Internal server error response, as expected.
Why are the "deeper down" errors being thrown from EFCore not being handled by the ExceptionHandler middleware, and crashing my app? Am I missing something?