(tokenExpiry: number | null, now: number)
| 139 | const eagerRefreshThresholdMs = Duration.toMillis(eagerRefreshThreshold) |
| 140 | |
| 141 | const isTokenFresh = (tokenExpiry: number | null, now: number) => |
| 142 | tokenExpiry != null && tokenExpiry > now + eagerRefreshThresholdMs |
| 143 | |
| 144 | const mapAccountServiceError = |
| 145 | (message = "Account service operation failed") => |