code: private static <T> T executeRetriable(int maxRetries, RetriableExecution<T> execution) throws DbxWrappedException, DbxException {
          if (maxRetries == 0) {
              return execution.execute();
          }
  
          int retries = 0;
          while (true) {
              try {
                  return execution.execute();
              } catch (RetryException ex) {
                  if (retries < maxRetries) {
                      ++retries;
                      sleepQuietlyWithJitter(ex.getBackoffMillis());
                  } else {
                      throw ex;
                  }
              }
          }
      }
docs: Retries the execution at most a maximum number of times.
  
  <p> This method is an alternative implementation to {@code DbxRequestUtil.runAndRetry(..)}
  that does <b>not</b> retry 500 errors ({@link com.dropbox.core.ServerException}). To maintain
  behavior backwards compatibility in v1, we leave the old implementation in {@code
  DbxRequestUtil} unchanged.