You can either chose in built methods like allsettled(), race(), any().
Promise.race(): The first resolved Promise (or the first rejected one) will determine the outcome.
promise.allSettled : Fulfills when all promises settle.
promise.any(). Fulfils when any of the promises are fulfilled; rejects when all of the promises are rejected.