fix: reply -32700 on stdio parse errors instead of closing (#833)
* fix: reply -32700 on stdio parse errors instead of closing * fix: make JsonRpcError id optional per MCP spec
This commit is contained in:
parent
0f776ab1d6
commit
321ab14f67
1 changed files with 191 additions and 53 deletions
|
|
@ -30,7 +30,7 @@ async fn test_client_init_handles_jsonrpc_error() {
|
|||
|
||||
let error_msg = ServerJsonRpcMessage::Error(JsonRpcError {
|
||||
jsonrpc: JsonRpcVersion2_0,
|
||||
id: RequestId::Number(1),
|
||||
id: Some(RequestId::Number(1)),
|
||||
error: ErrorData {
|
||||
code: ErrorCode(-32600),
|
||||
message: Cow::Borrowed("Invalid Request"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue