feat(chat_manager.py): send error message to client when an exception occurs

This commit is contained in:
Gabriel Almeida 2023-04-25 23:07:05 -03:00
commit ed2a2c7db8

View file

@ -167,6 +167,8 @@ class ChatManager:
except Exception as e:
# Handle any exceptions that might occur
print(f"Error: {e}")
# send a message to the client
await self.send_message(client_id, f"Error: {e}")
raise e
finally:
self.disconnect(client_id)