UseExceptionHandler is not working is Blazor
I want to show any unhandled errors in Blazor. I added UseExceptionHandler, but when I try to test it, it shows nothing. I do with "ASPNETCORE_ENVIROMENT: Production" value. I know about ErrorBoundary approach, but it's not what I want to do.
2 Replies
Oh, and also, it throws some kind of error, but I found a little piece of information about it:
What versions of ASP.NET and Blazor are you using? It looks like a GitHub issue (https://github.com/dotnet/aspnetcore/issues/49854) was opened that seems to be related to error pages not working when in production mode, and it looks like that might have been resolved / the related issues & PR discussions bring up some possible workarounds.
GitHub
[Blazor] Error page support · Issue #49854 · dotnet/aspnetcore
When I try to trigger the exception handler middleware by throwing an exception from a Blazor Web App I get an exception about RemoveNavigationManager being already initialized. Repro steps: Instal...