🐛 fix(manager.py): catch all exceptions instead of just TypeError when loading JSON payload to improve error handling and prevent crashes
This commit is contained in:
parent
5fd3394386
commit
9fb1a26277
1 changed files with 1 additions and 1 deletions
|
|
@ -187,7 +187,7 @@ class ChatManager:
|
|||
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