@page "/Error" @using System.Diagnostics @AppLocalization.Text("error.title", "Error")

@AppLocalization.Text("error.heading", "Error")

@AppLocalization.Text("error.processingRequest", "An error occurred while processing your request.")

@if (ShowRequestId) {

@AppLocalization.Text("error.requestId", "Request ID"): @RequestId

}

@AppLocalization.Text("error.developmentMode", "Development Mode")

@AppLocalization.Text("error.developmentDetails", "Switching to the Development environment will display more detailed information about the error that occurred.")

@AppLocalization.Text("error.developmentWarning", "The Development environment should not be enabled for deployed applications.") @AppLocalization.Text("error.developmentSensitive", "It can expose sensitive exception details to end users.") @AppLocalization.Text("error.developmentInstructions", "For local debugging, set the ASPNETCORE_ENVIRONMENT environment variable to Development and restart the application.")

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