Open Closed

Blazor Server: ABP Exception Dialog not shown #1523


User avatar
0
BassaSolutions created

With 4.3.2, we added a Blazor.Server Startup Project to our existing Blazor Project. On Blazor WASM, ABP automatically shows Error Dialogs for exceptions, e.g. for validations or UserFriendlyExceptions.

On Server side blazor no dialog is shown, instead, the whole client freezes. What must be done to get the ABP Error Dialog on Blazor.Server?

How to reproduce:

  1. Use new 4.3.2 (or 4.3.3) startup template with blazor
  2. Start blazor.server
  3. Throw UserFriendlyException

Thanks you!


1 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team Co-Founder

    Hi,

    Exceptions must be manually handled, otherwise it crashes the whole application. Auto exception handling is not possible with Blazor Server (not because of ABP, but Blazor doesn't allow it). Please see https://github.com/abpframework/abp/issues/8195

    You can use try-catch and call HandleErrorAsync method of ABP which shows the error dialog. This, at least, simplifies it.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38