In my code below, if any defer fails it goes to fail block and everything is lost. What I want here is , to ignore failed ones and grab successful ones. Any graceful way to do it? and How would I go to failed block if all defers fail. One work around could be to take a for loop and process deferredItems array in that loop one by one, but that is not graceful way to do it.
$.when.apply($, deferredItems).done(function(){
}).fail(function(errorObj) {
});