Repository navigation
Commit 0d01ee5
fix(everything): answer a JSON primitive POST body as an invalid request, not a parse error
Copilot round 8 on #5131: express.json is strict by default, so a body of
valid JSON that is not an object or array (null, "x", 42) failed to parse
and was answered -32700, which MCP reserves for text that is not JSON. The
parser now accepts any JSON value and the SDK answers a primitive with
-32600.
Part of #4852
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>1 parent 88410f8 commit 0d01ee5
2 files changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
657 | 674 | | |
658 | 675 | | |
659 | 676 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
| |||
0 commit comments