File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
mcp/src/main/java/io/modelcontextprotocol/spec Expand file tree Collapse file tree 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
178178 record MethodNotFoundError (String method , String message , Object data ) {
179179 }
180180
181- public static MethodNotFoundError getMethodNotFoundError (String method ) {
181+ private MethodNotFoundError getMethodNotFoundError (String method ) {
182182 switch (method ) {
183183 case McpSchema .METHOD_ROOTS_LIST :
184184 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
257257 record MethodNotFoundError (String method , String message , Object data ) {
258258 }
259259
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 );
268262 }
269263
270264 @ Override
You can’t perform that action at this time.
0 commit comments