( failedAccessToken: string, )
| 1415 | * @returns true if we now have a valid token, false otherwise |
| 1416 | */ |
| 1417 | export 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 | |
| 1430 | async function handleOAuth401ErrorImpl( |
| 1431 | failedAccessToken: string, |
no test coverage detected