Commit 45a3964
fix: gracefully handle unknown event types in Python SDK
The v3 server broadcasts new event types like permission.completed that
the generated session_events.py can't deserialize yet. Wrap
session_event_from_dict in try/except so unknown events are silently
skipped instead of crashing the notification handler. This affects both
the stdio and TCP connection handlers.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 27d05f1 commit 45a3964
1 file changed
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1348 | 1348 | | |
1349 | 1349 | | |
1350 | 1350 | | |
1351 | | - | |
1352 | | - | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
1353 | 1356 | | |
1354 | 1357 | | |
1355 | | - | |
| 1358 | + | |
1356 | 1359 | | |
1357 | 1360 | | |
1358 | 1361 | | |
| |||
1442 | 1445 | | |
1443 | 1446 | | |
1444 | 1447 | | |
1445 | | - | |
1446 | | - | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
1447 | 1453 | | |
1448 | | - | |
| 1454 | + | |
1449 | 1455 | | |
1450 | 1456 | | |
1451 | 1457 | | |
| |||
0 commit comments