From 5444c289f367e869f8fd96a6dceb5a1190178902 Mon Sep 17 00:00:00 2001
From: Xavier Moffett <sapphirus@azorium.net>
Date: Mon, 24 Feb 2025 17:32:56 -0500
Subject: [PATCH] Reduce verbosity of error messages, with addition of 500 and
 429 pages

- Reduce verbosity of error messages in existing error pages with a
  short description of the error which occurred, followed by a bullet
  point list of probable causes.
- Addition of HTTP Error 500 and 429 pages.
---
 .gitignore           |  3 +++
 input/error/403.html | 17 ++++++++++++-----
 input/error/404.html |  7 +++++++
 input/error/429.html | 17 +++++++++++++++++
 input/error/500.html | 16 ++++++++++++++++
 input/error/502.html | 13 +++++++++++--
 input/error/504.html | 13 +++++++++++--
 7 files changed, 77 insertions(+), 9 deletions(-)
 create mode 100644 .gitignore
 create mode 100644 input/error/429.html
 create mode 100644 input/error/500.html

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6dfffe4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/output
+/suo
+/*.sh
diff --git a/input/error/403.html b/input/error/403.html
index 6da0a5b..a610ad4 100644
--- a/input/error/403.html
+++ b/input/error/403.html
@@ -1,10 +1,17 @@
-[//]: # "Title: Access unauthorised"
+[//]: # "Title: Access Unauthorised"
 [//]: # "Summary: Access to this resource has been prohibited."
 
 <div class="err">
     <h1>Access Unauthorised</h1>
-    <p>Access to this resource has been prohibited, because either 
-    you have insufficient permissions to access this resource; or 
-    the ip address you're connecting from has been prohibited 
-    access to this server.</p>
+    <p>Access to this resource has been prohibited.</p>
+
+    <p>There could be a few reasons for this:</p>
+
+    <ul>
+        <li>Insufficient permission to access this resource;</li>
+        <li>Connecting from a blocked network, or;</li>
+        <li>A network associated with malicious traffic.</li>
+    </ul>
+
+    <p>If you believe this to be in error, e-mail <a href="mailto:3EjmZHiLR@mozmail.com" class="ml" a="ten.muiroza" b="nimda"></a>.</p>
 </div>
diff --git a/input/error/404.html b/input/error/404.html
index ac7780c..1ea7643 100644
--- a/input/error/404.html
+++ b/input/error/404.html
@@ -4,4 +4,11 @@
 <div class="err">
     <h1>Not Found</h1>
     <p>The resource requested not found on this server.</p>
+
+    <p>There could be a few reasons for this:</p>
+    
+    <ul>
+        <li>The resource requested is no longer available, or;</li>
+        <li>There might be an error in the address provided.</li>
+    </ul>
 </div>
diff --git a/input/error/429.html b/input/error/429.html
new file mode 100644
index 0000000..5f4e32a
--- /dev/null
+++ b/input/error/429.html
@@ -0,0 +1,17 @@
+[//]: # "Title: Too Many Reqests"
+[//]: # "Summary: Access to this resource has been throttled."
+
+<div class="err">
+    <h1>Too Many Requests</h1>
+    <p>Access to this resource has been throttled.</p>
+
+    <p>There could be a few reasons for this:</p>
+    
+    <ul>
+        <li>The rate limit for this resource has been exhausted, or;</li>
+        <li>An excessive amount of traffic to this resource is 
+            originating from malicious traffic on your network.</li>
+    </ul>
+
+    <p>Please try again later.</p>
+</div>
diff --git a/input/error/500.html b/input/error/500.html
new file mode 100644
index 0000000..264c55c
--- /dev/null
+++ b/input/error/500.html
@@ -0,0 +1,16 @@
+[//]: # "Title: Internal Server Error"
+[//]: # "Summary: An internal server error has occurred."
+
+<div class="err">
+    <h1>Internal Server Error</h1>
+    <p>An internal server error has occurred.</p>
+
+    <p>There could be a few reasons for this:</p>    
+    
+    <ul>
+        <li>An internal misconfiguration of this resource, or;</li>
+        <li>Maintenance of this resource is occurring.</li>
+    </ul>
+
+    <p>Please try again later, or <a href="https://status.sapphirus.net">check here</a> for further information.</p>
+</div>
diff --git a/input/error/502.html b/input/error/502.html
index 46c27ab..8a094d5 100644
--- a/input/error/502.html
+++ b/input/error/502.html
@@ -3,6 +3,15 @@
 
 <div class="err">             
     <h1>Bad Gateway</h1>
-    <p>The upstream resource is unavailable.<br>
-    Please try again later, or check <a href="https://status.sapphirus.net">here</a> for further information.</p>
+    <p>The upstream resource is unavailable.</p>
+
+    <p>There could be a few reasons for this:</p>    
+   
+    <ul>
+        <li>Maintenance of this resource is occurring;</li> 
+        <li>The upstream resource is unresponsive, or;</li>
+        <li>The upstream service is simply not available.</li>
+    </ul>
+
+    <p>Please try again later, or <a href="https://status.sapphirus.net">check here</a> for further information.</p>
 </div>
diff --git a/input/error/504.html b/input/error/504.html
index 98b81e9..700ed22 100644
--- a/input/error/504.html
+++ b/input/error/504.html
@@ -3,6 +3,15 @@
 
 <div class="err">             
     <h1>Gateway Timeout</h1>
-    <p>The upstream resource is unavailable.<br>
-    Please try again later, or check <a href="https://status.sapphirus.net">here</a> for further information.</p>
+    <p>The upstream resource is unavailable.</p>
+
+    <p>There could be a few reasons for this:</p>    
+        
+    <ul>
+        <li>Maintenance of this resource is occurring;</li> 
+        <li>The upstream resource is unresponsive, or;</li>
+        <li>The upstream service is simply not available.</li>
+    </ul>
+
+    <p>Please try again later, or <a href="https://status.sapphirus.net">check here</a> for further information.</p>
 </div>