@@ -224,14 +224,10 @@ private JsonRpcResponse handlePromptsList(JsonRpcRequest req) {
224224
225225 // Add prompts from proxy servers
226226 for (McpServerProxy proxy : proxies .values ()) {
227- try {
228- var response = proxy .rpc (req ).join ();
229- if (response .getError () == null ) {
230- var proxyPrompts = response .getResult ().asShape (ListPromptsResult .builder ()).getPrompts ();
231- allPrompts .addAll (proxyPrompts );
232- }
233- } catch (Exception e ) {
234- LOG .error ("Failed to fetch prompts from proxy: " + proxy .name (), e );
227+ var response = proxy .rpc (req ).join ();
228+ if (response .getError () == null ) {
229+ var proxyPrompts = response .getResult ().asShape (ListPromptsResult .builder ()).getPrompts ();
230+ allPrompts .addAll (proxyPrompts );
235231 }
236232 }
237233
@@ -252,18 +248,6 @@ private JsonRpcResponse handlePromptsGet(JsonRpcRequest req) {
252248 return createSuccessResponse (req .getId (), result );
253249 }
254250
255- // Try proxy servers
256- for (McpServerProxy proxy : proxies .values ()) {
257- try {
258- var response = proxy .rpc (req ).join ();
259- if (response .getError () == null ) {
260- return createSuccessResponse (req .getId (), response .getResult ());
261- }
262- } catch (Exception e ) {
263- LOG .error ("Failed to get prompt from proxy: " + proxy .name (), e );
264- }
265- }
266-
267251 throw new RuntimeException ("Prompt not found: " + promptName );
268252 }
269253
0 commit comments