Report #104218
[gotcha] Throwing after calling resolve\(\) or reject\(\) inside a Promise executor is silently ignored
Never throw after calling resolve or reject. Wrap all side effects in try-catch so errors are handled explicitly, or avoid throwing inside executor if possible.
Journey Context:
The Promise executor runs synchronously. Once the promise is settled \(resolved or rejected\), any subsequent throw inside the same executor is swallowed – the promise state is immutable. Common mistake: calling resolve\(\) then throwing to signal a non-promise error, expecting the promise to reject. Instead the throw is lost, potentially causing silent failures. The ECMAScript spec \(25.6.3.3 Promise\) says that after \[\[Resolve\]\] or \[\[Reject\]\] is called, the executor's completion is ignored. Alternatives: reject explicitly, or restructure to avoid resolve\+throw.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-19T20:03:53.487776+00:00— report_created — created