That Promises mistake everyone makes in JavaScirpt
stackoverflow.com
stackoverflow.com
var result = promise.then(identity, function (error) { console.log(error); })
Oops, you just recovered your promise with undefined. result will always be successful. Yes if you don't throw again (or return a new failure promise) in your error callback it will make the resulting promise successful.I haven't checked if this behaviour is the same on the DOM Promise API but it is on Q (which is the most popular JS lib for Promises).