♻️ New error page
This commit is contained in:
@@ -1,26 +1,23 @@
|
||||
@page
|
||||
@page "/Error/{statusCode?}"
|
||||
@model ErrorModel
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
ViewData["SiteName"] = Model.SiteName ?? "main";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
@if (Model.ShowRequestId)
|
||||
{
|
||||
<p>
|
||||
<strong>Request ID:</strong> <code>@Model.RequestId</code>
|
||||
</p>
|
||||
}
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
||||
<div class="h-screen flex justify-center items-center">
|
||||
<div class="text-center max-w-120">
|
||||
<img src="~/favicon.png" width="80" height="80" alt="Logo" class="mb-1 mx-auto"/>
|
||||
<h1 class="text-2xl">@(Model.StatusCode?.ToString() ?? "Error")</h1>
|
||||
<p>Something went wrong...</p>
|
||||
<p class="text-sm opacity-80 mt-1">Powered by the Solar Network Pages</p>
|
||||
<div class="text-xs opacity-70 mt-1">
|
||||
<p>Path: <b>@Model.CurrentPath</b></p>
|
||||
<p>Site ID: <b>@(Model.Site?.Id.ToString() ?? "none")</b></p>
|
||||
@if (Model.ShowRequestId)
|
||||
{
|
||||
<p>Request ID: <b>@Model.RequestId</b></p>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user