MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / handleOAuth401Error

Function handleOAuth401Error

src/utils/auth.ts:1356–1367  ·  view source on GitHub ↗
(
  failedAccessToken: string,
)

Source from the content-addressed store, hash-verified

1354 * @returns true if we now have a valid token, false otherwise
1355 */
1356export function handleOAuth401Error(
1357 failedAccessToken: string,
1358): Promise<boolean> {
1359 const pending = pending401Handlers.get(failedAccessToken)
1360 if (pending) return pending
1361
1362 const promise = handleOAuth401ErrorImpl(failedAccessToken).finally(() => {
1363 pending401Handlers.delete(failedAccessToken)
1364 })
1365 pending401Handlers.set(failedAccessToken, promise)
1366 return promise
1367}
1368
1369async function handleOAuth401ErrorImpl(
1370 failedAccessToken: string,

Callers 4

withOAuth401RetryFunction · 0.85
doFetchFunction · 0.85
createClaudeAiProxyFetchFunction · 0.85
withRetryFunction · 0.85

Calls 4

handleOAuth401ErrorImplFunction · 0.85
setMethod · 0.80
getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected