1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Return the proper http error codes on error

This commit is contained in:
Steffo 2019-02-26 19:55:53 +01:00
parent 7aeb004830
commit de6749db15

View file

@ -66,7 +66,7 @@ def require_login(f):
@app.errorhandler(400) @app.errorhandler(400)
def error_400(_=None): def error_400(_=None):
return render_template("400.html") return render_template("400.html"), 400
@app.route("/400") @app.route("/400")
@ -76,7 +76,7 @@ def page_400():
@app.errorhandler(403) @app.errorhandler(403)
def error_403(_=None): def error_403(_=None):
return render_template("403.html") return render_template("403.html"), 403
@app.route("/403") @app.route("/403")
@ -86,7 +86,7 @@ def page_403():
@app.errorhandler(500) @app.errorhandler(500)
def error_500(_=None): def error_500(_=None):
return render_template("500.html") return render_template("500.html"), 500
@app.route("/500") @app.route("/500")