code: function retryUntil(action, success, options) {
      return retryPromised(
          (retry, attempt) => action().then((result) => {
              if (success(result, attempt)) return result;
              throw new Error("should throw RetryUnsuccessfulError if failed");
          }).catch((e) => {
              if (e instanceof OperationIncompleteError) {
                  return retry(e);
              }
              throw e;
          }),
          options);
  }
docs: Retries the given (assumed to be asynchronous) action until it succeeds,
  or throws a general error.
  
  @param {function} action - the action to retry, expected to return a promise
  @param {function} success - A function that is passed the value to which
  `action()` resolves, and the current attempt (a number). Should
  either return true (indicating success), throw an instance of
  {@link WirelessTagPlatform.OperationIncompleteError} to indicate
  an unsuccessful attempt that should be retried, or throw another
  error to terminate retry attempts.
  @param {object} [options] - options to be passed on to `retryPromise`.
  @returns the value to which the action resolves
  @memberof module:lib/util