Promise.allSettled

A JavaScript function that waits for every promise in a list to finish and reports each one’s result, whether it succeeded or failed.

In more detail

Unlike Promise.all, which rejects as soon as one promise fails, allSettled always resolves with a status for every item. Callers can keep the successes and handle the failures one by one.

Related terms

Taught in

References