Why should you not wrap a promise in new Promise in JavaScript?
Because it is unnecessary and error-prone. If you already have a promise (like from fetch), just return it or chain .then. Wrapping it in new Promise and manually calling resolve/reject is redundant and can introduce bugs.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in Common Promise Mistakes in JavaScript
Not returning in .then, forgetting .catch (unhandled rejections), nesting .then (mini callback hell), using .then's second argument instead of .catch, sequential instead of parallel await, not using async/await, and wrapping promises in unnecessary new Promise.
Always add a .catch at the end of a .then chain, or use try/catch with async/await. In Node.js, unhandled rejections can crash the process. In browsers, they are warnings. Always handle errors.
Use Promise.all: const [a, b, c] = await Promise.all([fetchA(), fetchB(), fetchC()]). Start all promises at once, then await all. This is much faster than sequential await for independent operations.
Still have questions?
Browse all our FAQs or reach out to our support team
