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() rejects as soon as any promise fails, while Promise.allSettled() always waits for every promise and reports what happened to each. Pick all() when every result is required, allSettled() when partial success is fine.

The concept

Promise.all(list) resolves with an array of values only if every promise fulfils. The first rejection rejects the whole thing immediately (the others keep running but their results are ignored).

Promise.allSettled(list) never rejects. It resolves with an array of objects: {status:'fulfilled', value} or {status:'rejected', reason}, so you can inspect each outcome.

Same inputs, different outcome

await Promise.all([ok(), fail(), ok()])
Error: fail // rejected at once
await Promise.allSettled([ok(), fail(), ok()])
[{status:'fulfilled'}, {status:'rejected'}, {status:'fulfilled'}]

Practical examples

All-or-nothing: load required data

const [user, settings] = await Promise.all([
  fetch('/api/user').then(r => r.json()),
  fetch('/api/settings').then(r => r.json()),
])

Best effort: ping many services

const results = await Promise.allSettled(urls.map(u => fetch(u)))
const failed = results.filter(r => r.status === 'rejected')
console.log(`${failed.length} of ${results.length} failed`)

Timeout guard with Promise.race

const timeout = new Promise((_, rej) => setTimeout(() => rej(new Error('timeout')), 3000))
await Promise.race([fetch('/slow'), timeout])

Common mistakes

  • Using Promise.all for independent optional requests, so one failure hides the rest.
  • Not handling rejection: Promise.all without try/catch causes unhandled rejections.
  • Assuming Promise.all cancels the other promises — it does not.

Key takeaways

  • all = fail fast, allSettled = report everything.
  • allSettled results have status and value/reason.
  • Neither cancels in-flight work.

FAQ

Do the promises run in parallel?

Yes, they all start immediately when you create them; the combinators only wait for the results.

What about Promise.any?

any() resolves with the first fulfilled promise and rejects only if all of them reject.

More JavaScript articles