> ## 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.

# floating-promise

> A promise-returning call is neither awaited, returned nor handled, so its failure goes unseen.

## What it flags

A promise-returning call is a bare statement in an async function or request handler, or `array.forEach(async ...)` runs awaits nobody waits for. Returning, awaiting, using `void`, or attaching a rejection callback suppresses the bare-call warning. Omitted or nullish callbacks do not handle rejections.

## How to review or fix

Inside an async callback given to `.on`, `.once`, `.addListener`, `.addEventListener`, `.prependListener` or `.prependOnceListener`, no `await` fix is offered: the emitter ignores the callback's promise, so awaiting would still leave the rejection unhandled. Attach `.catch(handler)` to the call instead.

Test files and helpers listed under `fireAndForget` in the policy are skipped.

## Configuration

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

```json theme={null}
{
  "rules": { "floating-promise": "off" }
}
```


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