From de6749db159dd5e1accf7c42692028c8d8c11c29 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 26 Feb 2019 19:55:53 +0100 Subject: [PATCH] Return the proper http error codes on error --- webserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webserver.py b/webserver.py index eefffd8c..8b5ddda0 100644 --- a/webserver.py +++ b/webserver.py @@ -66,7 +66,7 @@ def require_login(f): @app.errorhandler(400) def error_400(_=None): - return render_template("400.html") + return render_template("400.html"), 400 @app.route("/400") @@ -76,7 +76,7 @@ def page_400(): @app.errorhandler(403) def error_403(_=None): - return render_template("403.html") + return render_template("403.html"), 403 @app.route("/403") @@ -86,7 +86,7 @@ def page_403(): @app.errorhandler(500) def error_500(_=None): - return render_template("500.html") + return render_template("500.html"), 500 @app.route("/500")