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