DEV Community

Discussion on: Promise.all (ES2015) vs Promise.allSettled (ES2020). What's changed? 🤔

Collapse
 
anduser96 profile image
Andrei Gatej

Thanks for sharing!

As far as I know, you can achieve the same result with Promise.all by attaching a ‘.catch()’ to each promise in your array.

Collapse
 
shahzaibkhalid profile image
Shahzaib Khalid

Yes, we could but Promise.allSettled is more concise. 🚀

Collapse
 
amcsi profile image
Attila Szeremi⚡

I think you can only handle the first error that way, not the other errors or successes.