Commit fa6a4a5
committed
fix: cover writeSSEEvent and method-not-allowed, surface caught parse errors
- Add onerror for writeSSEEvent catch (surfaces actual write failure)
- Add onerror for handleUnsupportedRequest (405 method not allowed)
- Surface the caught SyntaxError/ZodError in JSON and JSON-RPC parse catches
instead of constructing a generic 'Parse error' string — more useful for
debugging
- Update tests to assert on error types (SyntaxError, ZodError)1 parent 856058a commit fa6a4a5
File tree
2 files changed
+9
-7
lines changed- packages/server
- src/server
- test/server
2 files changed
+9
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
585 | | - | |
| 585 | + | |
| 586 | + | |
586 | 587 | | |
587 | 588 | | |
588 | 589 | | |
| |||
591 | 592 | | |
592 | 593 | | |
593 | 594 | | |
| 595 | + | |
594 | 596 | | |
595 | 597 | | |
596 | 598 | | |
| |||
642 | 644 | | |
643 | 645 | | |
644 | 646 | | |
645 | | - | |
646 | | - | |
| 647 | + | |
| 648 | + | |
647 | 649 | | |
648 | 650 | | |
649 | 651 | | |
| |||
657 | 659 | | |
658 | 660 | | |
659 | 661 | | |
660 | | - | |
661 | | - | |
| 662 | + | |
| 663 | + | |
662 | 664 | | |
663 | 665 | | |
664 | 666 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
813 | | - | |
| 813 | + | |
814 | 814 | | |
815 | 815 | | |
816 | 816 | | |
| |||
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
832 | | - | |
| 832 | + | |
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
| |||
0 commit comments