diff --git a/auth-api/src/auth_api/services/keycloak.py b/auth-api/src/auth_api/services/keycloak.py index 22800e4e8..5078713da 100644 --- a/auth-api/src/auth_api/services/keycloak.py +++ b/auth-api/src/auth_api/services/keycloak.py @@ -228,7 +228,10 @@ def remove_from_account_holders_group(keycloak_guid: str = None, **kwargs): keycloak_guid: Dict = user_from_context.sub if Role.ACCOUNT_HOLDER.value in user_from_context.roles: - KeycloakService.remove_user_from_group(keycloak_guid, GROUP_ACCOUNT_HOLDERS) + try: + KeycloakService.remove_user_from_group(keycloak_guid, GROUP_ACCOUNT_HOLDERS) + except Exception as err: + logger.error(f"Error removing user {user_from_context.sub} from account holders group: {err}") @staticmethod @user_context diff --git a/auth-api/src/auth_api/services/membership.py b/auth-api/src/auth_api/services/membership.py index f01d725d1..e33d5db1a 100644 --- a/auth-api/src/auth_api/services/membership.py +++ b/auth-api/src/auth_api/services/membership.py @@ -173,6 +173,7 @@ def send_notification_to_member(self, origin_url, notification_type): error_msg = f"No user contact record for user id {self._model.user_id}" logger.error(error_msg) logger.error("