Commit 11c5b82
fix(chat): catch ProcessTransport errors on interrupt
When the SDK child process has already exited, calling interrupt() throws
"ProcessTransport is not ready for writing" as an unhandled rejection,
crashing the server. Wrap the call in try/catch — if the transport is
dead the interrupt is moot anyway.
Also add .catch() to the fire-and-forget interruptChat() call in
ws-handler-v2 to prevent any future unhandled rejections from that path.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 5709b06 commit 11c5b82
2 files changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1273 | 1273 | | |
1274 | 1274 | | |
1275 | 1275 | | |
1276 | | - | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
1277 | 1286 | | |
1278 | 1287 | | |
1279 | 1288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
736 | 742 | | |
737 | 743 | | |
738 | 744 | | |
| |||
0 commit comments