DEV Community

Discussion on: Avoid async/await hell

Collapse
 
uzair004 profile image
Muhammad Uzair

What about error handling in this case, while using multiple awaits we could have error handling on response of each result , what would happen if promise got rejected, response is not same as what we expect ?

Collapse
 
judionit profile image
Judicaël Andriamahandry

so as mentioned Promise.all will asynchronously rejects with the value of the promise that rejected, whether or not the other promises have resolved