Hacker News new | ask | show | jobs
by Timon3 939 days ago
moring is describing an issue where the creation of the promise itself fails, which means Promise.all/Promise.allSettled is never called.
1 comments

Use the second pattern with `.allSettled` but map it with an async function.

      const result = await Promise.allSettled(elements.map(async x => someAsyncFunction3(computeArg3(x))));