From f9e58648801f173e935485c87de5bf33b0dfc356 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 10 Jun 2024 10:15:54 -0500 Subject: Return error code in error handlers. --- gn_auth/errors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gn_auth') diff --git a/gn_auth/errors.py b/gn_auth/errors.py index 7b6ad33..1a48b9e 100644 --- a/gn_auth/errors.py +++ b/gn_auth/errors.py @@ -21,9 +21,9 @@ def page_not_found(exc): "error": exc.name, "error_description": (f"The page '{request.url}' does not exist on " "this server.") - })), 404 + })), exc.code - return render_template("404.html", page=request.url) + return render_template("404.html", page=request.url), exc.code def handle_authorisation_error(exc: AuthorisationError): """Handle AuthorisationError if not handled anywhere else.""" -- cgit v1.2.3