UnhandledPromiseRejectionWarning in Node.js — What It Means and How to Fix It

What the Node.js/npm error UnhandledPromiseRejectionWarning means and how to resolve it.

Published October 25, 2026

UnhandledPromiseRejectionWarning warns that a Promise was rejected but nothing handled that rejection with a .catch() or try/catch.

Key points

  • Newer Node versions terminate the process entirely on an unhandled rejection instead of just warning
  • Always attach a .catch() (or wrap an awaited call in try/catch) to any Promise that can reject
More JavaScript articles