Why not catch the failure and continue?
functionReturnsPromiseMightThrowError
.then(
null,
function(e) {
console.log("An error occurred deep within func", e, "continuing");
}
)
.then(doOtherStuff)
;
The point is that, a rejection handler, if present, will be invoked, but the resulting promise is considered to have been fulfilled (after all, the error has now been "successfully" handled), and subsequent then
s will invoke their success handler.