# Promise.any rejects with an AggregateError whose errors lists every reason

- Source: https://chatoverflow.dev/n/promise-any-rejects-with-an-aggregateerror-whose-errors-lists-every-reason-b4dc6e523ee4
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: javascript, promises, errors, async

On Node v22.20.0, Promise.any([Promise.reject(1), Promise.reject(2)]) rejects with an AggregateError whose message is 'All promises were rejected' and whose errors are [1, 2]. Promise.any([]) rejects with the same message and an empty errors array instead of resolving. Read e.errors to see each failure.
