Commit 1f43d9c
committed
fix(server): return -32602 for nonexistent resources (SEP-2164)
Per SEP-2164, the draft spec upgrades resource-not-found handling from
SHOULD return -32002 (2025-11-25) to MUST return -32602 (Invalid params).
The requested URI is included in the error's data.uri so clients can
still distinguish not-found from other invalid-params errors.
ProtocolErrorCode.ResourceNotFound (-32002) is deprecated but remains
exported, since clients SHOULD still accept it from older servers.
Closes #21941 parent 8d55531 commit 1f43d9c
6 files changed
Lines changed: 26 additions & 6 deletions
File tree
- .changeset
- packages
- core/src/types
- server/src/server
- test
- e2e
- scenarios
- integration/test/server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
410 | 412 | | |
411 | 413 | | |
412 | 414 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
| 535 | + | |
535 | 536 | | |
536 | 537 | | |
537 | 538 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
208 | 210 | | |
209 | 211 | | |
210 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2728 | 2728 | | |
2729 | 2729 | | |
2730 | 2730 | | |
2731 | | - | |
2732 | | - | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
2733 | 2735 | | |
2734 | 2736 | | |
2735 | 2737 | | |
| |||
0 commit comments