Skip to main content

What it flags

new Promise(async (resolve) => ...) starts an async executor. The constructor discards the executor’s returned promise. The caller’s .catch() observes the outer promise. If the executor rejects without forwarding the error through reject, the outer promise can remain pending and the caller’s handler never runs. The rule skips an executor whose whole body is one try whose catch calls the executor’s reject parameter on every path before anything else, and whose catch and finally blocks do not await.

How to review or fix

Return the async operation directly when its promise represents the intended result. For a callback-based API that still needs an executor, keep the executor synchronous and explicitly settle the outer promise on both success and failure.