Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public static final class ErrorCodes {
/**
* Resource not found.
*/
public static final int RESOURCE_NOT_FOUND = -32002;
public static final int RESOURCE_NOT_FOUND = INVALID_PARAMS;

/**
* URL elicitation is required before the request can proceed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void testNotFound() {
String uri = "file:///nonexistent.txt";
McpError mcpError = McpError.RESOURCE_NOT_FOUND.apply(uri);
assertNotNull(mcpError.getJsonRpcError());
assertEquals(-32002, mcpError.getJsonRpcError().code());
assertEquals(McpSchema.ErrorCodes.INVALID_PARAMS, mcpError.getJsonRpcError().code());
assertEquals("Resource not found", mcpError.getJsonRpcError().message());
assertEquals(Map.of("uri", uri), mcpError.getJsonRpcError().data());
}
Expand Down