From 8f63f8a7ef51340171366294dc5939f67808fff8 Mon Sep 17 00:00:00 2001 From: cato447 Date: Thu, 15 Jan 2026 00:36:27 +0100 Subject: [PATCH] added proper http codes --- app/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routes.py b/app/routes.py index 94b1030..b697f8e 100644 --- a/app/routes.py +++ b/app/routes.py @@ -158,7 +158,7 @@ def ratelimit_handler(e): msg = Message('429 Ratelimit hit', recipients=["simon.bussmann@tum.de"]) msg.body = f"IP {request.remote_addr} triggered the rate limit" mail.send(msg) - return render_template("ratelimit_error.html", error_message=e.description) + return render_template("ratelimit_error.html", error_message=e.description), 429 @bp.errorhandler(500) def server_error(e): @@ -168,4 +168,4 @@ def server_error(e): msg.body = f"An error occurred during registration:\n\n{full_traceback}" mail.send(msg) - return render_template("error.html", error_message="Internal Server Error. Admin has been notified!") + return render_template("error.html", error_message="Internal Server Error. Admin has been notified!"), 500