> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# async-callback-unhandled-rejection

> An async callback given to an event emitter, timer or scheduler has no error handling, so a rejection is unhandled.

## What it flags

An async callback given to `.on`/`.once`, a timer, `process.nextTick` or `cron.schedule` awaits outside a try/catch; nothing handles its promise, so a rejection crashes Node 15+.

The check accounts for same-file async helpers that handle failure and return a primitive fallback. An untyped return covered only by a declared primitive result is reported as contextual.

## How to review or fix

The generated fix wraps the whole callback body in a try/catch that logs errors and requires review. When statements follow the last top-level statement containing an await, handle the finding manually. Keep success-only work in the try block and put cleanup that must run on failure in a finally block. Handle cleanup errors too, since the caller ignores the callback's promise.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "async-callback-unhandled-rejection": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.