User
Deploy localized dashboard fixes
3dd5c9a
Raw History Blame Contribute Delete
1.5 kB
@page "/Error"
@using System.Diagnostics
<PageTitle>@AppLocalization.Text("error.title", "Error")</PageTitle>
<h1 class="text-danger">@AppLocalization.Text("error.heading", "Error")</h1>
<h2 class="text-danger">@AppLocalization.Text("error.processingRequest", "An error occurred while processing your request.")</h2>
@if (ShowRequestId)
{
<p>
<strong>@AppLocalization.Text("error.requestId", "Request ID"):</strong> <code>@RequestId</code>
</p>
}
<h3>@AppLocalization.Text("error.developmentMode", "Development Mode")</h3>
<p>
@AppLocalization.Text("error.developmentDetails", "Switching to the Development environment will display more detailed information about the error that occurred.")
</p>
<p>
<strong>@AppLocalization.Text("error.developmentWarning", "The Development environment should not be enabled for deployed applications.")</strong>
@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.")
</p>
@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;
}