File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 77import {
88 StreamableHTTPClientTransport ,
99 StreamableHTTPClientTransportOptions ,
10+ StreamableHTTPError ,
1011} from "@modelcontextprotocol/sdk/client/streamableHttp.js" ;
1112import {
1213 ClientNotification ,
@@ -358,8 +359,11 @@ export function useConnection({
358359 const is401Error = ( error : unknown ) : boolean => {
359360 return (
360361 ( error instanceof SseError && error . code === 401 ) ||
362+ ( error instanceof StreamableHTTPError && error . code === 401 ) ||
361363 ( error instanceof Error && error . message . includes ( "401" ) ) ||
362- ( error instanceof Error && error . message . includes ( "Unauthorized" ) )
364+ ( error instanceof Error && error . message . includes ( "Unauthorized" ) ) ||
365+ ( error instanceof Error &&
366+ error . message . includes ( "Missing Authorization header" ) )
363367 ) ;
364368 } ;
365369
You can’t perform that action at this time.
0 commit comments