The angular documentation is not in the details, but I believe that $q.all() behaves in this case in the same way as es2015 Promise.all() :
If any of the transmitted promises is rejected, then all Promise immediately rejects the value of the promise, which is rejected, discarding all other promises, whether they were resolved.
Most likely, what happens here is that at least one of your queries fails. Your log statements do not distinguish whether $q.all() successful or unsuccessful, but if it does not work, all you see is the first error.
For the source of the quote, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all .
Edit:
If you want to get all the answers, even if some do not work, then you should add a catch handler to saveAudit to convert errors to successful answers:
function saveAudit(audit) { var filename = audit.header.id + ".txt"; return $http({ method: 'PUT', url: '/audits/audits.php?filename=' + encodeURIComponent(filename), data: AuditSvc.getPlainAudit(audit.header.id) }).catch(function(error) { return { error:error}; }) .finally(function () { $scope.sendAudits.progress += 1; console.log("FINALLY: " + audit.header.id); }); }
and then you need to check each answer to see if it contains an error or valid data.
source share