ets-berkeley-edu/calcentral — pull request #137 by yuhunglin (2012-09-26 22:57:15+00:00)
Title: [CLC-305] Harden classes and projects widgets to handle ajax failures from services more gracefully

JIRA: https://jira.media.berkeley.edu/jira/browse/CLC-305

- Similar refactoring that @christianv, @shacker and I did for the projects widget, applied to the clases widget.
- Rerouted ajax failures from bspace and canvas to use resolve instead of reject instead. Why?

In the case where multiple Deferred objects are passed to jQuery.when, the method returns the Promise from a new "master" Deferred object that tracks the aggregate state of all the Deferreds it has been passed. The method will resolve its master Deferred as soon as ALL the Deferreds resolve, or reject the master Deferred as soon as ONE of the Deferreds is rejected.

tl;dr: Didn't want to stop chain execution due to one ajax request failing, it's sufficient to continue just with an empty response and the filters/renderer functions down the line know how to handle the merging of empty objects.