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:
parent
7aeb004830
commit
de6749db15
1 changed files with 3 additions and 3 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue