Skip to content

Commit

Permalink
added error log to user resource
Browse files Browse the repository at this point in the history
  • Loading branch information
matbusby-fw committed Dec 13, 2024
1 parent 0813e01 commit b2de1c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions services/core-api/app/api/users/resources/user_resource.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

0 comments on commit b2de1c9

Please sign in to comment.