Try to execute a list of promises until one succeeds.
npm install p-fallback
const pFallback = require("p-fallback");
const result = await pFallback([
asyncOperation,
otherAsyncOperation
]);
Type: Array<() => Promise>
The array of promise-returning functions to execute. An [AggregateError] is thrown if all of them fail.