fix(manager.py): catch all exceptions instead of just TypeError when loading JSON payload to handle any parsing errors
feat(index.tsx): add authentication token to WebSocket URL to authenticate the user
This commit is contained in:
parent
38eb1a2d79
commit
927379b245
2 changed files with 5 additions and 3 deletions
|
|
@ -191,7 +191,7 @@ class ChatManager(Service):
|
|||
json_payload = await websocket.receive_json()
|
||||
try:
|
||||
payload = orjson.loads(json_payload)
|
||||
except TypeError:
|
||||
except Exception:
|
||||
payload = json_payload
|
||||
if "clear_history" in payload:
|
||||
self.chat_history.history[client_id] = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue