We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4fe8f3e commit 485d4f8Copy full SHA for 485d4f8
mcp-core/src/main/java/io/modelcontextprotocol/spec/McpError.java
@@ -4,6 +4,7 @@
4
5
package io.modelcontextprotocol.spec;
6
7
+import com.fasterxml.jackson.annotation.JsonCreator;
8
import io.modelcontextprotocol.spec.McpSchema.JSONRPCResponse.JSONRPCError;
9
import io.modelcontextprotocol.util.Assert;
10
@@ -22,6 +23,10 @@ public class McpError extends RuntimeException {
22
23
24
private JSONRPCError jsonRpcError;
25
26
+ /**
27
+ * Add @JsonCreator to make sure Jackson can deserialize it properly.
28
+ * */
29
+ @JsonCreator
30
public McpError(JSONRPCError jsonRpcError) {
31
super(jsonRpcError.message());
32
this.jsonRpcError = jsonRpcError;
0 commit comments