feat(chat_manager.py): send error message to client when an exception occurs
This commit is contained in:
parent
5793e3cb2e
commit
ed2a2c7db8
1 changed files with 2 additions and 0 deletions
|
|
@ -167,6 +167,8 @@ class ChatManager:
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# Handle any exceptions that might occur
|
# Handle any exceptions that might occur
|
||||||
print(f"Error: {e}")
|
print(f"Error: {e}")
|
||||||
|
# send a message to the client
|
||||||
|
await self.send_message(client_id, f"Error: {e}")
|
||||||
raise e
|
raise e
|
||||||
finally:
|
finally:
|
||||||
self.disconnect(client_id)
|
self.disconnect(client_id)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue