Promise.any()
static method takes an iterable (i.e. an array) of promises as input and returns a single Promise.
This returned promise fulfills when any of the input's promises fulfills, with this first fulfillment value.Promise.any()
resolves when any one of the promises resolves successfully. Furthermore:AggregateError
containing an array of rejection reasons.errors
propery of the AggregateError
contains several information about the errors: