-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
DoneThis issue has been fixedThis issue has been fixedPriority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releaseUser StoryA single user-facing feature. Can be grouped under an epic.A single user-facing feature. Can be grouped under an epic.affected-mediumThis issue impacts approximately half of our customersThis issue impacts approximately half of our customersarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing oneseverity-blockingThis label is used by an internal toolThis label is used by an internal tool
Milestone
Description
Summary
This proposes adding an error boundaries feature to Blazor, as inspired by the implementation in React. This feature would allow developers to implement logic on individual components to capture any excpetions, log, display a fallback UI, send telemetry, etc.
This feature was proposed in #13452 but I'm pulling it out into a separate issue to be more precise about the proposed solution.
Motivation
A meaningfully complex Blazor app will contain numerous components, both first-party and third-party. There's no way to guarantee that all exception cases will be handled in a component. There's also no way to indicate that even though an unhandled exception occurred in one part of the app, that the entire app is not compromised.
Goals
- Allow users to provide fallback UIs for select component subtrees in the event that there is an exception there
- Allow users to build apps with cleaner fallback experiences in the event of unexpected UIs
- Give users more fine-grained control over how failures are handled in the app
Non-goals
- Implement any kind of global exception handling in Blazor (we already have
ILogger
for logging, and beyond that, truly unhandled exceptions mean the app is in an undefined state which is unsafe to continue) - Add more sophisticated exception handling to the components in Blazor (besides the APIs needed to build this feature)
sjohag, physix99, christiansparre, gulbanana, Andras-Csanyi and 16 moreJvanderStad and gulbanana
Metadata
Metadata
Assignees
Labels
DoneThis issue has been fixedThis issue has been fixedPriority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releaseUser StoryA single user-facing feature. Can be grouped under an epic.A single user-facing feature. Can be grouped under an epic.affected-mediumThis issue impacts approximately half of our customersThis issue impacts approximately half of our customersarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing oneseverity-blockingThis label is used by an internal toolThis label is used by an internal tool