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

Function handleOAuth401Error

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

Source from the content-addressed store, hash-verified

1446 * @returns true if we now have a valid token, false otherwise
1447 */
1448export function handleOAuth401Error(
1449 failedAccessToken: string,
1450): Promise<boolean> {
1451 const pending = pending401Handlers.get(failedAccessToken)
1452 if (pending) return pending
1453
1454 const promise = handleOAuth401ErrorImpl(failedAccessToken).finally(() => {
1455 pending401Handlers.delete(failedAccessToken)
1456 })
1457 pending401Handlers.set(failedAccessToken, promise)
1458 return promise
1459}
1460
1461async function handleOAuth401ErrorImpl(
1462 failedAccessToken: string,

Callers 1

Calls 4

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

Tested by

no test coverage detected