Commit 22d4881
fix: call onerror for silently swallowed transport errors
Nested try/catch blocks in WebStandardStreamableHTTPServerTransport's
handlePostRequest were returning error responses without invoking the
onerror callback, making transport errors invisible to consumers.
Fixes: - JSON parsing errors (req.json() failures) now call onerror
- JSON-RPC message validation errors now call onerror
- writeSSEEvent failures now call onerror instead of silently
returning false
Closes #1395
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 42b3359 commit 22d4881
2 files changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
572 | | - | |
| 572 | + | |
| 573 | + | |
573 | 574 | | |
574 | 575 | | |
575 | 576 | | |
| |||
627 | 628 | | |
628 | 629 | | |
629 | 630 | | |
630 | | - | |
| 631 | + | |
| 632 | + | |
631 | 633 | | |
632 | 634 | | |
633 | 635 | | |
| |||
641 | 643 | | |
642 | 644 | | |
643 | 645 | | |
644 | | - | |
| 646 | + | |
| 647 | + | |
645 | 648 | | |
646 | 649 | | |
647 | 650 | | |
| |||
0 commit comments