title: jQuery Deferred: Rejecting a Promise from within a Done Filter
body: <p>Fyi, I'm just starting to learn jQuery promises, so I may be a bit confused here.</p>
  
  <p>Anyway, I have an AJAX request that I want to reject from within a done filter based on the content of the response: </p>
  
  <pre><code>return doAJAXRequest().then(function (data) {
      if (data.responseText == "YES") {
          return doOtherAJAXRequest();
      } else {
          this.reject(data);
      }
  });
  </code></pre>
  
  <p>That didn't work as I expected:</p>
  
  <pre><code>Uncaught TypeError: Object #&lt;Object&gt; has no method 'reject'
  </code></pre>
  
  <p>How do I make this promise fail based on its response? Is that possible? Or am I just confused about what needs to be done here?</p>