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