@page "/error" @using System.Diagnostics @inject IHttpContextAccessor HttpContextAccessor Error

Unexpected Error

An error occurred while processing your request

@if (ShowRequestId) {

Request ID: @RequestId

}
@code{ public string? RequestId { get; set; } public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); protected override void OnInitialized() => RequestId = Activity.Current?.Id ?? HttpContextAccessor.HttpContext?.TraceIdentifier; }