For returned values within a then or catch callback, the rule is that that promise must resolve before the outer promise resolves, and that the resolved value should be the value promised by the returned promise. catch function is preferred rather than passing in resolved callback and rejected callback new Promise((resolve, reject) ).thenWhen errors occur in promise, it will bubble up to the .catch() new Promise((resolve, reject) > throw new Error(error) ).then(() > console.log Using ES6 promises, in a completely successful run, these would all be run one after anotherThis makes me think I should add a single .catch() at the very end of the . then promise chain ES6Promisependingrejected promisethencatch "es6 promise catch. " resultados de la bsqueda relacionadosThe catch() method returns a Promise and deals with rejected cases only. It behaves the same as calling Promise.prototype.then(undefined, onRejected) (in fact > Promise.all([a, b].map(promise > promise.catch(catchHandler)) .then(results > console.
log(results)) . catch(() > console.log(Promise.all failed)) < [ Resolved!, payload: Promise, resolved: false ]. The problem with this is that the caught values will have a different interface than Then, Again an analysis of .then and .catch. Creating a Promise From Scratch. Settling a Promise discusses states of a Promise.