Promise.all() vs Promise.allSettled() in JavaScript

Understand the difference between Promise.all() and Promise.allSettled() — when one rejected promise should fail everything versus when you need every result.

Published September 16, 2026

Promise.all() and Promise.allSettled() both run an array of promises concurrently, but they differ in how they handle failures. Promise.all() rejects immediately if any promise rejects; Promise.allSettled() always waits for every promise and reports each outcome individually.

Common causes

  • Promise.all() is designed for "all-or-nothing" operations where a single failure means the whole batch is invalid
  • Promise.allSettled() is designed for independent operations where you want to know the result of every promise regardless of individual failures

How to fix it

  • Use Promise.all() when every result is required and any failure should short-circuit the rest, e.g. loading required config files
  • Use Promise.allSettled() when partial success is acceptable, e.g. sending notifications to many users where one failing shouldn't stop the others
  • Check each result's .status ('fulfilled' or 'rejected') when using allSettled() to branch on success/failure per item

Example

const results = await Promise.allSettled([fetch(a), fetch(b)])
results.forEach(r => {
  if (r.status === 'fulfilled') console.log(r.value)
  else console.error(r.reason)
})

FAQ

Does Promise.all() cancel the other promises when one rejects?

No — it rejects immediately with the first error, but the other promises keep running in the background; they're just no longer awaited by that Promise.all() call.

More JavaScript articles