MCPcopy Create free account
hub / github.com/modelcontextprotocol/typescript-sdk / shouldAttemptFallback

Function shouldAttemptFallback

src/client/auth.ts:821–823  ·  view source on GitHub ↗

* Determines if fallback to root discovery should be attempted

(response: Response | undefined, pathname: string)

Source from the content-addressed store, hash-verified

819 * Determines if fallback to root discovery should be attempted
820 */
821function shouldAttemptFallback(response: Response | undefined, pathname: string): boolean {
822 return !response || (response.status >= 400 && response.status < 500 && pathname !== '/');
823}
824
825/**
826 * Generic function for discovering OAuth metadata with fallback support

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…