<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/promise-all-vs-allsettled-vs-race-vs-any-xfkanzqgv" -->

---
title: Promise.all vs allSettled vs race vs any | daily.dev
description: JavaScript provides four promise combinators with distinct failure behaviors. Promise.all() fails fast on the first rejection, making it ideal when all results...
canonical: https://daily.dev/posts/promise-all-vs-allsettled-vs-race-vs-any-xfkanzqgv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Promise.all vs allSettled vs race vs any | daily.dev
og:description: JavaScript provides four promise combinators with distinct failure behaviors. Promise.all() fails fast on the first rejection, making it ideal when all results...
og:url: https://daily.dev/posts/promise-all-vs-allsettled-vs-race-vs-any-xfkanzqgv
og:image: https://api.daily.dev/og/posts/XfKanzQGV.png
og:image:alt: Promise.all vs allSettled vs race vs any
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Promise.all vs allSettled vs race vs any

**[Flavio Copes](https://daily.dev/sources/flaviocopes)** · 5 min read · 3 upvotes · 0 comments

## Summary

JavaScript provides four promise combinators with distinct failure behaviors. Promise.all() fails fast on the first rejection, making it ideal when all results are required. Promise.allSettled() waits for every promise and never rejects, returning status objects for each outcome — useful for partial success scenarios like batch emails. Promise.race() resolves or rejects with whichever promise settles first, commonly used for timeouts. Promise.any() fulfills with the first successful promise and only rejects (with AggregateError) if all fail, making it ideal for fallback/mirror patterns. Common pitfalls include unhandled rejections from race() losers, accidentally writing sequential awaits instead of parallel Promise.all(), and forgetting that allSettled() never throws so try/catch is useless around it.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://flaviocopes.com/promise-all-allsettled-race-any>

## Questions this post answers

### What happens to the other promises when Promise.all rejects because one promise failed?

The other promises keep running in the background even after Promise.all rejects; JavaScript promises cannot be cancelled, so Promise.all simply stops waiting once the first rejection occurs. If a call rejects after 100ms, the await throws at that point, but a slower call that was also passed in still completes and its result is discarded.

_When resolving concurrent async calls in JavaScript, daily.dev surfaces practical breakdowns like this one._

### Why does wrapping Promise.allSettled in a try/catch not catch failures?

Promise.allSettled never rejects, so a try/catch around it does nothing useful. Every promise, whether fulfilled or rejected, resolves into a result object with a status field ('fulfilled' or 'rejected'), and you must check that status on each entry yourself or failures will silently pass through unnoticed.

_Developers debugging silent async failures can find these gotchas explained clearly on daily.dev._

### Why can Promise.race cause an unhandled rejection in Node.js even when it resolves successfully?

When racing a fetch against a timeout promise, if the fetch wins, the timeout promise is still pending and will reject later (e.g., after 5 seconds) with nothing listening for it, causing an unhandled rejection that can crash the Node.js process depending on configuration. Attaching a rejection handler to every promise, or using AbortController with AbortSignal.timeout() for fetch, avoids this.

_For anyone hardening timeout logic in production JavaScript, daily.dev is a good place to catch these edge cases early._

## Similar posts on daily.dev

- [Is Promise.all still relevant in 2025?](https://daily.dev/posts/is-promise-all-still-relevant-in-2025--pqrcmhpqz) · LogRocket · 8 upvotes · 0 comments
- [Rethinking async loops in JavaScript](https://daily.dev/posts/rethinking-async-loops-in-javascript-zktafkvag) · Matt Smith · 6 upvotes · 1 comments
- [Mastering Parallel Data Fetching in Next.js: Combining Suspense, Promise.all, and Promise.allSettled](https://daily.dev/posts/mastering-parallel-data-fetching-in-next-js-combining-suspense-promise-all-and-promise-allsettled-oqhl1mozl) · Medium · 51 upvotes · 2 comments
- [The Async Mistake That Makes JavaScript Code Lie to You](https://daily.dev/posts/the-async-mistake-that-makes-javascript-code-lie-to-you-b9d5ujlbf) · Medium · 4 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/promise-all-vs-allsettled-vs-race-vs-any-xfkanzqgv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Promise.all vs allSettled vs race vs any","url":"https://daily.dev/posts/promise-all-vs-allsettled-vs-race-vs-any-xfkanzqgv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/promise-all-vs-allsettled-vs-race-vs-any-xfkanzqgv"},"datePublished":"2026-07-29T07:53:56.136Z","dateModified":"2026-09-14T09:18:21.488Z","description":"JavaScript provides four promise combinators with distinct failure behaviors. Promise.all() fails fast on the first rejection, making it ideal when all results...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7219243bb6b6113ecc90bd933965a4ef?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7219243bb6b6113ecc90bd933965a4ef?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Flavio Copes","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Flavio Copes","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9","url":"https://daily.dev/sources/flaviocopes"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/promise-all-vs-allsettled-vs-race-vs-any-xfkanzqgv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Flavio Copes","item":"https://daily.dev/sources/flaviocopes"},{"@type":"ListItem","position":3,"name":"Promise.all vs allSettled vs race vs any"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/promise-all-vs-allsettled-vs-race-vs-any-xfkanzqgv#faq","mainEntity":[{"@type":"Question","name":"What happens to the other promises when Promise.all rejects because one promise failed?","acceptedAnswer":{"@type":"Answer","text":"The other promises keep running in the background even after Promise.all rejects; JavaScript promises cannot be cancelled, so Promise.all simply stops waiting once the first rejection occurs. If a call rejects after 100ms, the await throws at that point, but a slower call that was also passed in still completes and its result is discarded. When resolving concurrent async calls in JavaScript, daily.dev surfaces practical breakdowns like this one."}},{"@type":"Question","name":"Why does wrapping Promise.allSettled in a try/catch not catch failures?","acceptedAnswer":{"@type":"Answer","text":"Promise.allSettled never rejects, so a try/catch around it does nothing useful. Every promise, whether fulfilled or rejected, resolves into a result object with a status field ('fulfilled' or 'rejected'), and you must check that status on each entry yourself or failures will silently pass through unnoticed. Developers debugging silent async failures can find these gotchas explained clearly on daily.dev."}},{"@type":"Question","name":"Why can Promise.race cause an unhandled rejection in Node.js even when it resolves successfully?","acceptedAnswer":{"@type":"Answer","text":"When racing a fetch against a timeout promise, if the fetch wins, the timeout promise is still pending and will reject later (e.g., after 5 seconds) with nothing listening for it, causing an unhandled rejection that can crash the Node.js process depending on configuration. Attaching a rejection handler to every promise, or using AbortController with AbortSignal.timeout() for fetch, avoids this. For anyone hardening timeout logic in production JavaScript, daily.dev is a good place to catch these edge cases early."}}]}
```

