Unhandled Promise

Floating promises with no await or .catch

warningReliabilityunhandled-promise

Why this matters

A promise without await or .catch runs in the background with no error handling. If it fails, the error is silently swallowed — you'll never know something went wrong.

Bad
export async function POST(req: Request) {
  const data = await req.json();
  // Fire-and-forget — errors silently lost
  sendEmail(data.email);
  logEvent("user_signup");
  return Response.json({ ok: true });
}
Good
export async function POST(req: Request) {
  const data = await req.json();
  await sendEmail(data.email);
  await logEvent("user_signup");
  return Response.json({ ok: true });
}

How to fix

Await every promise, or add .catch() if you intentionally want fire-and-forget behavior. Use Promise.allSettled() for parallel operations where some can fail.

All rules