File tree 2 files changed +3
-9
lines changed
mcp/src/main/java/io/modelcontextprotocol/spec
2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ private Mono<McpSchema.JSONRPCResponse> handleIncomingRequest(McpSchema.JSONRPCR
178
178
record MethodNotFoundError (String method , String message , Object data ) {
179
179
}
180
180
181
- public static MethodNotFoundError getMethodNotFoundError (String method ) {
181
+ private MethodNotFoundError getMethodNotFoundError (String method ) {
182
182
switch (method ) {
183
183
case McpSchema .METHOD_ROOTS_LIST :
184
184
return new MethodNotFoundError (method , "Roots not supported" ,
Original file line number Diff line number Diff line change @@ -257,14 +257,8 @@ private Mono<Void> handleIncomingNotification(McpSchema.JSONRPCNotification noti
257
257
record MethodNotFoundError (String method , String message , Object data ) {
258
258
}
259
259
260
- static MethodNotFoundError getMethodNotFoundError (String method ) {
261
- switch (method ) {
262
- case McpSchema .METHOD_ROOTS_LIST :
263
- return new MethodNotFoundError (method , "Roots not supported" ,
264
- Map .of ("reason" , "Client does not have roots capability" ));
265
- default :
266
- return new MethodNotFoundError (method , "Method not found: " + method , null );
267
- }
260
+ private MethodNotFoundError getMethodNotFoundError (String method ) {
261
+ return new MethodNotFoundError (method , "Method not found: " + method , null );
268
262
}
269
263
270
264
@ Override
You can’t perform that action at this time.
0 commit comments