MCPcopy Create free account
hub / github.com/continuedev/continue / isAuthError

Function isAuthError

extensions/cli/src/services/mcpUtils.ts:9–19  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

7 * Since we're using mcp library there's a good chance 405 means auth issue and doesn't hurt to retry with auth
8 */
9export function isAuthError(error: unknown): boolean {
10 return (
11 (error instanceof SseError && error.code === 401) ||
12 (error instanceof SseError && error.code === 405) ||
13 (error instanceof StreamableHTTPError && error.code === 401) ||
14 (error instanceof StreamableHTTPError && error.code === 405) ||
15 (error instanceof Error && error.message.includes("401")) ||
16 (error instanceof Error && error.message.includes("405")) ||
17 (error instanceof Error && error.message.includes("Unauthorized"))
18 );
19}

Callers 1

getConnectedClientMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected