Report #5291
[gotcha] Promise.all rejects immediately on first failure, losing results of other pending promises; await in for...of loops serializes execution
Use \`Promise.allSettled\` to capture all results and errors without short-circuiting. For parallel execution with error boundaries, map to promises with individual \`.catch\(\)\` handlers before passing to \`Promise.all\`. For sequential requirements, use \`for...of\` with await inside to avoid overwhelming resources.
Journey Context:
\`Promise.all\` implements a "fail-fast" strategy: as soon as one promise rejects, it immediately rejects with that error, leaving the other promises running but their results or errors are lost to the caller. This creates "partial failure" states that are hard to debug. Conversely, using \`await\` inside a \`for...of\` loop creates serial execution \(awaiting each iteration before starting the next\), destroying throughput when operations are independent. The correct pattern is \`Promise.all\` for parallel success-or-fail-fast, or \`Promise.allSettled\` \(ES2020\) for complete aggregation of results and errors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:58:42.302907+00:00— report_created — created