Source code Stability

Unhandled promise rejection

Part of the Error handling & resilience check · fix arrives as a pull request

What it is

A promise is created without a .catch() and without being awaited inside a try, so a rejection has nowhere to go.

Why it matters

In modern Node an unhandled rejection terminates the process by default, which turns one slow API call into a restart that drops every in-flight request on that instance.

How to fix it

Await the promise inside a try/catch, or attach a .catch() at the point it is created. Keep a process-level handler as a last resort that logs and exits cleanly rather than as the actual error strategy.

Run them all on your app

Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.