Promise.race returns the first promise to settle (fulfilled or rejected). Promise.any returns the first promise to fulfill (ignores rejections until all reject). race can reject on the first rejection; any only rejects if all reject.
What is the difference between Promise.race and Promise.any?
More FAQs in Promise.all, allSettled, race, and any: A Complete Guide
Promise.all (all must succeed, fast fail), Promise.allSettled (all settle, never rejects), Promise.race (first to settle wins), Promise.any (first to fulfill wins, AggregateError if all reject).
Promise.all rejects if any promise rejects (fast fail). Promise.allSettled waits for all promises, even if some reject, and returns an array of { status, value/reason } objects. Use allSettled for partial success.
An error type thrown by Promise.any when all promises reject. It has an errors property containing an array of all the individual rejection reasons. This lets you see why each promise failed.
Still have questions?
Browse all our FAQs or reach out to our support team
Want to upskill yourself?
Your learning library
Small steps. Big possibilities.
Find your next course. Build something great.