30 lines
668 B
Plaintext
30 lines
668 B
Plaintext
@page "/error"
|
|
|
|
@using System.Diagnostics
|
|
|
|
<PageTitle>Ошибка</PageTitle>
|
|
|
|
<h1 class="text-danger">Ошибка</h1>
|
|
<h2 class="text-danger">При выполнении запроса возникла ошибка</h2>
|
|
|
|
@if (ShowRequestId)
|
|
{
|
|
<p>
|
|
<strong>ID запроса:</strong> <code>@RequestId</code>
|
|
</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;
|
|
}
|
|
}
|