aspnetcore: ErrorBoundary support for multiple exceptions
Am I using this incorrectly? I implemented as per Documentation in MainLayout.razor with the slight change that in my <ErrorContent> section I added a button that triggers errorBoundary?.Recover();.
My test involved throwing a generic exception with a message from a child component in protected override void OnInitialized(). The result was that instead of displaying the content of @Body or the ErrorContent, there was nothing. Upon opening the browser inspector I had an empty <main></main>.
I also tried creating a custom class that implemented ErrorBoundary, but this did not help either.
_Originally posted by @thirstyape in https://github.com/dotnet/aspnetcore/issues/30874#issuecomment-989263259_
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 17 (12 by maintainers)
Are there any updates on this topic? One year later it seems multiple exceptions at once are not supported by ErrorBoundary. The ErrorContent won’t render.
Thanks @thirstyape, let’s keep this issue open to track potentially adding support for multiple exceptions in the future.
Hi @TanayParikh, thank you for reviewing this.
Yes, as the
<Tab>component has multiple instances, there will be multiple exceptions. If that is not currently a supported way to use<ErrorBoundary>we can close this issue. Of course, that would be nice to see eventually 😃