Add a try..except to audit log broadcast

This commit is contained in:
luukas 2022-05-18 16:51:46 +03:00
parent 4c64497a2f
commit 74198ff81c

View File

@ -180,7 +180,12 @@ class HelpersManagement:
server_users = PermissionsServers.get_server_user_list(server_id)
for user in server_users:
self.helper.websocket_helper.broadcast_user(user, "notification", audit_msg)
try:
self.helper.websocket_helper.broadcast_user(
user, "notification", audit_msg
)
except Exception as e:
logger.error(f"Error broadcasting to user {user} - {e}")
AuditLog.insert(
{