From 4a323173e409f5c8e8b465c143ad1092556f9d7b Mon Sep 17 00:00:00 2001 From: sachin Date: Sat, 27 Feb 2021 11:08:08 -0800 Subject: [PATCH] Created 404 response handler --- flask-backend/api/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flask-backend/api/__init__.py b/flask-backend/api/__init__.py index 9ac0507c..9348f633 100644 --- a/flask-backend/api/__init__.py +++ b/flask-backend/api/__init__.py @@ -32,6 +32,10 @@ def load_user(user_id): def unauthorized_handler(): return 'You are not authorized to use this route. Please Logged In.', 401 + @app.errorhandler(404) + def page_not_found(e): + return str(e), 404 + from .userAuthentication.auth import auth as auth_blueprint app.register_blueprint(auth_blueprint)