We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a24e0c commit 87722f8Copy full SHA for 87722f8
src/mcp/shared/session.py
@@ -29,6 +29,7 @@
29
ServerNotification,
30
ServerRequest,
31
ServerResult,
32
+ REQUEST_CANCELLED,
33
)
34
35
SendRequestT = TypeVar("SendRequestT", ClientRequest, ServerRequest)
@@ -279,7 +280,7 @@ async def send_request(
279
280
281
282
raise McpError(
- ErrorData(code=32601, message="Request cancelled")
283
+ ErrorData(code=REQUEST_CANCELLED, message="Request cancelled")
284
285
286
except TimeoutError:
src/mcp/types.py
@@ -146,6 +146,7 @@ class JSONRPCResponse(BaseModel):
146
METHOD_NOT_FOUND = -32601
147
INVALID_PARAMS = -32602
148
INTERNAL_ERROR = -32603
149
+REQUEST_CANCELLED = -32604
150
151
152
class ErrorData(BaseModel):
0 commit comments