From eaf361ad91353f7e36b2e42913fd55737e6edf88 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Wed, 12 Oct 2022 01:17:48 -0700 Subject: [PATCH] API: set the status code on errors --- files/routes/errors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/errors.py b/files/routes/errors.py index fe311bb6c..65f52cd45 100644 --- a/files/routes/errors.py +++ b/files/routes/errors.py @@ -30,7 +30,7 @@ def error(e): if WERKZEUG_ERROR_DESCRIPTIONS.get(e.code, None) == details: details = None if request.headers.get("Authorization") or request.headers.get("xhr"): - return {"error": title, "code": e.code, "description": msg, "details": details} + return {"error": title, "code": e.code, "description": msg, "details": details}, e.code img = ERROR_MARSEYS.get(e.code, 'marseyl') return render_template('errors/error.html', err=True, title=title, msg=msg, details=details, img=img), e.code