send errors to pending requests if server closes (#333)

Co-authored-by: ihrpr <inna@anthropic.com>
This commit is contained in:
Marshall Roch
2025-05-27 17:55:27 -04:00
committed by GitHub
parent 9dad26620f
commit 7901552eba
3 changed files with 71 additions and 1 deletions

View File

@@ -149,6 +149,10 @@ class JSONRPCResponse(BaseModel):
model_config = ConfigDict(extra="allow")
# SDK error codes
CONNECTION_CLOSED = -32000
# REQUEST_TIMEOUT = -32001 # the typescript sdk uses this
# Standard JSON-RPC error codes
PARSE_ERROR = -32700
INVALID_REQUEST = -32600