diff --git a/server/src/main.py b/server/src/main.py index 2d3c36d..053cd4c 100644 --- a/server/src/main.py +++ b/server/src/main.py @@ -87,6 +87,8 @@ class Server: conn.send(json.dumps({"command": command}).encode()) except json.decoder.JSONDecodeError: logger.error(f"Invalid JSON received from {addr}") + except UnicodeDecodeError: + logger.error(f"Invalid UTF-8 received from {addr}") except Exception as e: logger.error(f"Error handling agent {agent_id}: {e}") finally: