File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -351,6 +351,7 @@ export function useConnection({
351351 return ;
352352 }
353353
354+ let lastRequest = "" ;
354355 try {
355356 // Inject auth manually instead of using SSEClientTransport, because we're
356357 // proxying through the inspector server first.
@@ -564,7 +565,9 @@ export function useConnection({
564565 }
565566
566567 if ( capabilities ?. logging && defaultLoggingLevel ) {
568+ lastRequest = "logging/setLevel" ;
567569 await client . setLoggingLevel ( defaultLoggingLevel ) ;
570+ lastRequest = "" ;
568571 }
569572
570573 if ( onElicitationRequest ) {
@@ -578,6 +581,17 @@ export function useConnection({
578581 setMcpClient ( client ) ;
579582 setConnectionStatus ( "connected" ) ;
580583 } catch ( e ) {
584+ if (
585+ lastRequest === "logging/setLevel" &&
586+ e instanceof McpError &&
587+ e . code === ErrorCode . MethodNotFound
588+ ) {
589+ toast ( {
590+ title : "Error" ,
591+ description : `Server declares logging capability but doesn't implement method: "${ lastRequest } "` ,
592+ variant : "destructive" ,
593+ } ) ;
594+ }
581595 console . error ( e ) ;
582596 setConnectionStatus ( "error" ) ;
583597 }
You can’t perform that action at this time.
0 commit comments