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

Function handleOAuth401Error

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

Source from the content-addressed store, hash-verified

1415 * @returns true if we now have a valid token, false otherwise
1416 */
1417export function handleOAuth401Error(
1418 failedAccessToken: string,
1419): Promise<boolean> {
1420 const pending = pending401Handlers.get(failedAccessToken)
1421 if (pending) return pending
1422
1423 const promise = handleOAuth401ErrorImpl(failedAccessToken).finally(() => {
1424 pending401Handlers.delete(failedAccessToken)
1425 })
1426 pending401Handlers.set(failedAccessToken, promise)
1427 return promise
1428}
1429
1430async function handleOAuth401ErrorImpl(
1431 failedAccessToken: string,

Callers 4

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

Calls 4

handleOAuth401ErrorImplFunction · 0.85
deleteMethod · 0.80
setMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected