docs: function(optionsOrCallback, model) {
        var options;
        if (_.isFunction(optionsOrCallback)) {
          var callback = optionsOrCallback;
          options = {
            success: function(result) {
              callback(result, null);
            },
            error: function(error) {
              callback(null, error);
            }
          };
        } else {
          options = _.clone(optionsOrCallback);
        }
        options = options || {};
  
        return this.then(function(result) {
          if (options.success) {
            options.success.apply(this, arguments);
          } else if (model) {
            // When there's no callback, a sync event should be triggered.
            model.trigger('sync', model, result, options);
          }
          return Parse.Promise.as.apply(Parse.Promise, arguments);
        }, function(error) {
          if (options.error) {
            if (!_.isUndefined(model)) {
              options.error(model, error);
            } else {
              options.error(error);
            }
          } else if (model) {
            // When there's no error callback, an error event should be triggered.
            model.trigger('error', model, error, options);
          }
          // By explicitly returning a rejected Promise, this will work with
          // either jQuery or Promises/A semantics.
          return Parse.Promise.error(error);
        });
      }