diff options
author | Frederick Muriuki Muriithi | 2024-06-10 10:15:54 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-06-10 10:15:54 -0500 |
commit | f9e58648801f173e935485c87de5bf33b0dfc356 (patch) | |
tree | 1e55244f85c686780b18063fd55003c80dc05987 | |
parent | c3b179f46e75e92de942a2d45d49c74cb887efc8 (diff) | |
download | gn-auth-f9e58648801f173e935485c87de5bf33b0dfc356.tar.gz |
Return error code in error handlers.
-rw-r--r-- | gn_auth/errors.py | 4 |
1 files changed, 2 insertions, 2 deletions
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.""" |