Chaining Angular promise rejections
I have a chained promise and in the case of a rejection for either of the promises, I need to perform an async operation (get the translated error message). As I've already got a chained promise on success, I assume it's not possible to also chain on rejection - I am attempting to simply nest the async calls, but I'm not getting the resolved promise back from deferred.reject(deferredRejection.promise); below. Pointers appreciated! login: function(email, password) { var deferred = $q.defer(); AuthService.login(email, password).then(function(response) { var user = { 'accountToken': response