Fix Missing Required Client Capability error code (#15)
The spec cites -32003 for "Missing Required Client Capability", but the canonical code is -32021: SEP-2663 uses -32021 in all four of these spots, the core 2026-07-28 schema defines MissingRequiredClientCapability Error as -32021, and the TypeScript SDK exports MISSING_REQUIRED_CLIENT_CAPABILITY = -32021. -32003 appears in no core schema version.
This commit is contained in:
parent
2c1425d9a2
commit
c523f2c21d
1 changed files with 4 additions and 4 deletions
|
|
@ -60,7 +60,7 @@ A server that has negotiated this extension **MAY** return `CreateTaskResult` in
|
|||
|
||||
A server **MUST NOT** return `CreateTaskResult` to a client that did not include the extension capability on its request, regardless of prior declarations. A client that has negotiated this extension **MUST** be prepared to handle either `CallToolResult` or `CreateTaskResult` in response to any supported request it issues. A client that receives `CreateTaskResult` in response to an unsupported request type **MUST** interpret this as an invalid response to the request.
|
||||
|
||||
If a server is unable to service a request to a client that does not declare this extension capability without returning `CreateTaskResult`, the server **MUST** return an error with the code `-32003` (Missing Required Client Capability), indicating the required extension in the error response:
|
||||
If a server is unable to service a request to a client that does not declare this extension capability without returning `CreateTaskResult`, the server **MUST** return an error with the code `-32021` (Missing Required Client Capability), indicating the required extension in the error response:
|
||||
|
||||
```jsonl
|
||||
{
|
||||
|
|
@ -68,7 +68,7 @@ If a server is unable to service a request to a client that does not declare thi
|
|||
"id": 1,
|
||||
"error": {
|
||||
// MISSING_REQUIRED_CLIENT_CAPABILITY
|
||||
"code": -32003,
|
||||
"code": -32021,
|
||||
// Message provided for example purposes only. The content of this example message is non-normative.
|
||||
"message": "Missing required client capability",
|
||||
"data": {
|
||||
|
|
@ -461,7 +461,7 @@ If a client requests task status notifications but does not declare the `io.mode
|
|||
"jsonrpc": "2.0",
|
||||
"id": 12,
|
||||
"error": {
|
||||
"code": -32003,
|
||||
"code": -32021,
|
||||
"message": "Missing required client capability",
|
||||
"data": {
|
||||
"requiredCapabilities": {
|
||||
|
|
@ -794,7 +794,7 @@ Servers **MUST** return standard JSON-RPC errors for the following protocol erro
|
|||
- Servers **MUST** return this error for `tasks/get`.
|
||||
- Servers **SHOULD** return this error for `tasks/update` and `tasks/cancel`.
|
||||
- Internal errors: `-32603` (Internal error)
|
||||
- Missing required client capabilities: `-32003` (Missing Required Client Capability)
|
||||
- Missing required client capabilities: `-32021` (Missing Required Client Capability)
|
||||
- Servers **MUST** return this error for non-declaring clients requesting task notifications on `subscriptions/listen`.
|
||||
- Servers **MUST** return this error for non-declaring clients issuing `tasks/get`, `tasks/update`, and `tasks/cancel` requests.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue