Exception handler middleware not catching
In my case, I found that app.UseMiddleware<ExceptionHandlingMiddleware>();
should be at the top of Configure()
method.
My solution to this problem was to remove app.UseDeveloperExceptionPage();
in Startup.cs