| ✅ Do | ❌ Don’t | | ------------------------------------------------------------------ | ------------------------------------------------------- | | Log full stack traces and context (request IDs, payloads, etc.) | Continue running as if nothing happened | | Report to external error‑tracking services (Sentry, Datadog, etc.) | Swallow errors or leave handlers empty | | Gracefully shut down: close DB, stop accepting new requests | Call `process.exit(0)` (signals success) | | Use a supervisor (e.g., PM2, Docker restart policy) | Believe you can recover 100% safely in‑process | | Convert unhandled rejections into exceptions (`throw reason`) | Ignore Node.js v15+ default behavior—explicit is better |