DEV Community


Discussion on: How to wait for multiple Promises?

mariokandut profile image
Mario Author

Promise.allSettled is another way to handle multiple promises. The difference is that Promise.all rejects as soon one rejects, Promise.allSettled() returns a promise that resolves after all have rejected or resolved. This means it is more fault-tolerant, you can achieve the same with adding a catch handler to the promise.all, see example in article. I think I will add an article about the difference Promise.all and Promise.allSettled. Thanks for the constructive input.