warnRefreshFailed warns that refreshing the expiring token failed with err and the current token is used as is. Callers of the refreshing token methods drop the returned error, so without it the user would only see the generic HTTP 401 the stale token eventually earns.
(hostname, username string, err error)
| 597 | // Callers of the refreshing token methods drop the returned error, so without it the user would only see the generic |
| 598 | // HTTP 401 the stale token eventually earns. |
| 599 | func (c *AuthConfig) warnRefreshFailed(hostname, username string, err error) { |
| 600 | c.addWarning(fmt.Sprintf( |
| 601 | "Could not refresh the token of account %s on %s: %v. "+ |
| 602 | "The token has expired or is about to expire, so requests may fail until a refresh succeeds.", |
| 603 | username, hostname, err)) |
| 604 | } |
| 605 | |
| 606 | // refreshRejectionRecheckDelays are the pauses before each re-read in credentialRotatedByPeer. The first re-read is |
| 607 | // immediate; the later ones give a peer that spent the same refresh token moments earlier time to finish storing its |
no test coverage detected