If you asked me to identify the most maintainable and easy to read of these two pieces of code, I would say the answer is easy.
Promises:
const p1, p2 = undefined;
somePromise()
.then((res) => {
p1 = somePromise(res);
return anotherPromiseFuncThatNeedsP1(p1);
})
.then((anotherPromiseRes) => {
p2 = anotherPromiseRes;
return p2;
})
.catch(e => {
// log, throw etc.
});
// done
vstry/catch:
try {
const p1 = await somePromise();
const p2 = await anotherPromiseFuncThatNeedsP1(p1);
// done
} catch(e) {
// log, throw, etc.
}