JS Interop doesn't report the correct callstack #8612
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
There's a catch and re-throw that's breaking call stacks when using JSInterop. We probably need to use
ExceptionDispatchInfo
here to try and preserve the information.You can repro this by adding a button that throws when clicked (server side).
I think the culprit is this pattern here: https://github.com/aspnet/Extensions/blob/master/src/JSInterop/Microsoft.JSInterop/src/DotNetDispatcher.cs#L106
I think we should also try to get rid of the
ContinueWith
here if possible (or specify the task scheduler). This has been problematic most places we do it.Server
Client
The text was updated successfully, but these errors were encountered: