( failedAccessToken: string, )
| 1446 | * @returns true if we now have a valid token, false otherwise |
| 1447 | */ |
| 1448 | export 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 | |
| 1461 | async function handleOAuth401ErrorImpl( |
| 1462 | failedAccessToken: string, |
no test coverage detected