Solved it, the call to UseStatusCodePagesWithReExecute
needs to go before calling UseRouting
. That way, I can use UseExceptionHandler
without 404s going unhandled by the ErrorController
. It's worth noting that if you use UseExceptionHandler
, the controller will need to have logic to log the exception, else, it just gets swallowed.