code: func (b *Remote) retryLogHook(attemptNum int, resp *http.Response) {
  	if b.CLI != nil {
  		// Ignore the first retry to make sure any delayed output will
  		// be written to the console before we start logging retries.
  		//
  		// The retry logic in the TFE client will retry both rate limited
  		// requests and server errors, but in the remote backend we only
  		// care about server errors so we ignore rate limit (429) errors.
  		if attemptNum == 0 || resp.StatusCode == 429 {
  			// Reset the last retry time.
  			b.lastRetry = time.Now()
  			return
  		}
  
  		if attemptNum == 1 {
  			b.CLI.Output(b.Colorize().Color(strings.TrimSpace(initialRetryError)))
  		} else {
  			b.CLI.Output(b.Colorize().Color(strings.TrimSpace(
  				fmt.Sprintf(repeatedRetryError, time.Since(b.lastRetry).Round(time.Second)))))
  		}
  	}
  }
docs: // retryLogHook is invoked each time a request is retried allowing the
  // backend to log any connection issues to prevent data loss.