code: function(error) {
        if (this._resolved || this._rejected) {
          throw "A promise was rejected even though it had already been " +
            (this._resolved ? "resolved" : "rejected") + ".";
        }
        this._rejected = true;
        this._error = error;
        Parse._arrayEach(this._rejectedCallbacks, function(rejectedCallback) {
          rejectedCallback(error);
        });
        this._resolvedCallbacks = [];
        this._rejectedCallbacks = [];
      }
docs: Marks this promise as fulfilled, firing any callbacks waiting on it.
  @param {Object} error the error to pass to the callbacks.