code: function retry(err) {
      if (currentAttempt >= retryCount) {
        return callback(err, null, currentAttempt);
      }
  
      currentAttempt += 1;
  
      // Since the currentAttempt starts at 1 and it was just incremented
      // currentAttempt - 2 will be the actual timeout index.
      return setTimeout(attempt, timeouts[currentAttempt - 2]);
    }
docs: The error is never null in this function call