Special page to handle 500 errors

This commit is contained in:
rockstardev
2020-02-01 01:44:01 -06:00
parent ef503fa907
commit fb2a0fb7fb
3 changed files with 17 additions and 1 deletions

View File

@@ -14,7 +14,8 @@ namespace BTCPayServer.Controllers
{
if (statusCode.HasValue)
{
if (statusCode.Value == 404)
var specialPages = new[] { 404, 500 };
if (specialPages.Any(a => a == statusCode.Value))
{
var viewName = statusCode.ToString();
return View(viewName);

View File

@@ -0,0 +1,15 @@
@{
ViewData["ErrorTitle"] = "500 - Internal Server Error";
}
<p class="lead-login">
Whoops, something really went wrong! <a href="https://twitter.com/mrkukks">Mr Kukks</a> is so sorry.
<br /><br />
<a href="https://twitter.com/mrkukks" target="_blank">
<img src="~/img/errorpages/500_mrkukks.jpg" alt="Mr Kukks puppy eyes" title="The most innocent look you'll ever see" />
</a>
<br /><br />
Consult server log and consider submitting issue on BTCPayServer GitHub.
<br /><br />
<a href="/">Navigate back to home</a>.
</p>

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB