Use promise.catch(fail) instead of promise.then(void 0, fail);