title: Cannot access reject parameter from returned promise
body: <p>I cannot access the returned reject from this deferred. I think it might be because this function is nested and I have to place a return reject somewhere else. Please advise.Thanks.</p>
  
  <p>I'm expecting the reject value, to be used here:</p>
  
  <pre><code>    $.search(boxes).then(function(results) {
        console.log(results, "place_results length: ", public.place_results.length);
        // public.showPlaces();
      }), function(error) {
        console.log("failed search");
        console.log(error);
      };
  
  
  
  $.search = function (boxes) {
        function findNextPlaces(place_results, searchIndex) {
            var dfd = $.Deferred();
            if (searchIndex &lt; boxes.length) {
                // service.nearbySearch({
                service.radarSearch({
                    bounds: boxes[searchIndex],
                    // types: ["food"]
                    keyword: ["coffee"],
                    // rankBy: google.maps.places.RankBy.DISTANCE
                }, function (results, status) {
                    if (status != google.maps.places.PlacesServiceStatus.OK  &amp;&amp; status === 'OVER_QUERY_LIMIT') {
                        failed_Queries.push(boxes[searchIndex]);
                        console.log("failed!: boxes:",searchIndex, failed_Queries);
                        // dfd.reject("Request["+searchIndex+"] failed: "+status);
                        return dfd.reject("failed").promise();
                    }
                    if (status != 'OVER_QUERY_LIMIT'){
                      console.log(status);
                      console.log( "bounds["+searchIndex+"] returns "+results.length+" results" );
                      for (var i = 0, result; result = results[i]; i++) {
                          var marker = createMarker(result);
                          public.place_results.push(result.reference); // marker?
                          $(document).trigger('test', result.reference);
                      }                    
                    }
                    dfd.resolve(public.place_results, searchIndex+1);
                });
                  return timeDelay(1000).then(function() {
                          return dfd.then(findNextPlaces);                        
                        });
              }
            else {
              return dfd.resolve(public.place_results).promise();
            }
        }
      return findNextPlaces(public.place_results, 0);
    }
  </code></pre>