Error

IsabyteError

Branded error screens for HTTP codes and unhandled exceptions, with Development/Production detail levels and context-sensitive recovery actions. Your app catches the error with its own framework's error handling and passes it here to display.

Trigger Errors

Click a button to simulate an error and see the corresponding template:

Quick HTTP codes:

Click a trigger button above to preview an error template.

Current Configuration
📋
<!-- Error handling is enabled on IsabyteRootComponent -->
<IsabyteRootComponent EnableErrorHandling="true"
                  IsDevelopment="true">
    @Body
</IsabyteRootComponent>

<!-- Errors are caught automatically. To trigger manually: -->
@code {
    [CascadingParameter]
    public IsabyteErrorState? ErrorState { get; set; }

    void ShowError() => ErrorState?.ShowHttpError(404);
}

@code {
// Display mode: Development
// Current preview: None

// Enable error handling in BaseLayout.razor:
<IsabyteRootComponent EnableErrorHandling="true"
                  IsDevelopment="true"
                  OnError="HandleError">
    @Body
</IsabyteRootComponent>

// Handle errors with a callback:
private async Task HandleError(IsabyteErrorEventArgs args)
{
    await _logger.LogAsync(args.ErrorContext);
    // args.Handled = true; // Suppress IsabyteError UI
}

// Register HttpClient error interception:
builder.Services.AddScoped<IsabyteErrorState>();
builder.Services.AddScoped<IsabyteHttpErrorHandler>();
builder.Services.AddHttpClient("API")
    .AddHttpMessageHandler<IsabyteHttpErrorHandler>();
}
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.