oliverbooth.dev/OliverBooth/Pages/Error.cshtml

34 lines
651 B
Plaintext
Raw Permalink Normal View History

2023-08-11 15:51:20 +01:00
@page "/error/{code:int?}"
2023-08-05 21:00:19 +01:00
@model OliverBooth.Pages.ErrorModel
2023-05-26 19:05:44 +01:00
@{
2023-09-25 20:06:05 +01:00
Layout = "_MinimalLayout";
2023-05-26 19:05:44 +01:00
ViewData["Title"] = "Error";
}
2023-09-25 20:06:05 +01:00
<h2 class="text-danger">
@switch (Model.HttpStatusCode)
{
case 403:
<span>403 Forbidden</span>
break;
case 404:
<span>404 Page not found</span>
break;
case 500:
<span>Internal server error</span>
break;
default:
<span>Something went wrong</span>
break;
}
</h2>
2023-05-26 19:05:44 +01:00
@if (Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
2023-09-25 20:06:05 +01:00
}