diff --git a/website/routes.py b/website/routes.py
index 23e8652..be38a48 100644
--- a/website/routes.py
+++ b/website/routes.py
@@ -217,7 +217,9 @@ def txtLogin():
if next_page and next_page != "None":
return redirect(next_page)
- return redirect("/")
+ return render_template("error.html",error="The domain wasn't able to be authenticated.",
+ message="
Double check the TXT record and try again",
+ custom=""), 200
@bp.route("/txt/")
def txtLoginDomain(domain):
@@ -277,7 +279,9 @@ def txtLoginDomain(domain):
if next_page and next_page != "None":
return redirect(next_page)
- return redirect("/")
+ return render_template("error.html",error="The domain wasn't able to be authenticated.",
+ message="
Double check the TXT record and try again",
+ custom=""), 200
@bp.route("/logout")
def logout():
@@ -500,5 +504,4 @@ def favicon():
@bp.errorhandler(404)
@bp.app_errorhandler(404)
def page_not_found(e):
- print(f'404 error: {e}')
- return render_template("404.html"), 404
+ return render_template("error.html",error="404 - Page Not Found"), 404
diff --git a/website/templates/404.html b/website/templates/error.html
similarity index 95%
rename from website/templates/404.html
rename to website/templates/error.html
index b26dd72..b0d12e5 100644
--- a/website/templates/404.html
+++ b/website/templates/error.html
@@ -110,7 +110,13 @@
HNS Login
- 404 - Page Not Found
+ {{error | safe}}
+ {{message|safe}}
+
+
+ {{custom|safe}}
+
+
Return to Home