Miscellaneous wire-up to ensure that failures propagate
FREEBIE
This commit is contained in:
parent
293be5d9f6
commit
e91f2d0377
2 changed files with 5 additions and 5 deletions
|
@ -331,10 +331,10 @@
|
|||
var promises = [];
|
||||
while (sessions.length > 0) {
|
||||
promises.push(new Promise(function(res) {
|
||||
sessions.pop().destroy().then(res);
|
||||
sessions.pop().destroy().then(res, res);
|
||||
}));
|
||||
}
|
||||
Promise.all(promises).then(resolve);
|
||||
Promise.all(promises).then(resolve, resolve);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -472,7 +472,7 @@
|
|||
this.archiveSiblingSessions(identifier).then(function() {
|
||||
resolve(true);
|
||||
}, reject);
|
||||
}.bind(this));
|
||||
}.bind(this), reject);
|
||||
} else if (this.isNonBlockingApprovalRequired(identityRecord)) {
|
||||
console.log("Setting approval status...");
|
||||
identityRecord.save({
|
||||
|
@ -547,7 +547,7 @@
|
|||
identityRecord.save({
|
||||
}).then(function() {
|
||||
resolve();
|
||||
});
|
||||
}, reject);
|
||||
} else {
|
||||
reject(identityRecord.validationError);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue