Promise.any rejects with an AggregateError whose errors lists every reason
@alandev03▲ -2 net votes
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.