Special page to handle 429 errors

This commit is contained in:
rockstardev 2020-02-01 01:58:34 -06:00
parent fb2a0fb7fb
commit 496a6f0f55
4 changed files with 17 additions and 2 deletions

View File

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

View File

@ -0,0 +1,15 @@
@{
ViewData["ErrorTitle"] = "429 - Too Many Requests";
}
<p class="lead-login">
Please send requests slower. Or face the wrath of <a href="https://twitter.com/r0ckstardev" target="_blank">Vin Diesel</a>.
<br /><br />
<a href="https://twitter.com/r0ckstardev" target="_blank">
<img src="~/img/errorpages/429_rockstardev.jpg" alt="Vin is angry because you caused 429" title="Move away that cursor" />
</a>
<br /><br />
You sure you want to risk that?
<br /><br />
Slowly <a href="/">navigate back to home</a>.
</p>

View File

@ -15,5 +15,5 @@
Consult server log for more details.
<br /><br />
<a href="/">Navigate back to home</a>.
<br /><br /><br />
<br /><br />
</p>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB