Enforce circuit termination on unhandled exception #11845
Labels
area-blazor
Includes: Blazor, Razor Components
bug
This issue describes a behavior which is not expected - a bug.
Done
This issue has been fixed
Milestone
From #11791
Currently we have many code paths that catch exceptions and then pass them to
Renderer.HandleException
but otherwise swallow the exception. From there,Renderer.HandleException
logs the exception on the server, and sends a (redacted) exception message to the client, which then terminates the connection.It's not good enough to trust that the client will actually terminate the connection. It might not do, and then the circuit will continue running but in an unknown state.
When fixing this, add tests to show we now enforce server-side circuit termination (but the application process itself continues to run and accept new circuits) in:
IComponent.Configure
)IComponent.SetParametersAsync
OnInitAsync
). We have to be strict about lifecycle-method exceptions because it doesn't make sense to continue using the app when parts of the UI are dead. We would need some kind of "dead component" UI to appear instead of the failed component.OnAfterRenderAsync
(called byRenderer.NotifyRenderCompleted
)Dispose
.The text was updated successfully, but these errors were encountered: