diff --git a/services/core-api/app/api/users/resources/user_resource.py b/services/core-api/app/api/users/resources/user_resource.py index 2e292e595a..30a6bc4138 100644 --- a/services/core-api/app/api/users/resources/user_resource.py +++ b/services/core-api/app/api/users/resources/user_resource.py @@ -1,5 +1,6 @@ from datetime import datetime +from flask import current_app from flask_restx import Resource from pytz import utc from sqlalchemy.exc import IntegrityError @@ -42,4 +43,5 @@ def get(self): except IntegrityError: return {"message": "Failed to update user due to a database error."}, 500 except Exception as e: + current_app.logger.error(f'Error: {str(e)}') return {"message": f"An error occurred: {str(e)}"}, 500 \ No newline at end of file