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

# error-rethrown-without-cause

> A catch block throws a new error without the caught one, so the original message and stack are lost.

## What it flags

A `catch (err)` block throws `new SomeError(...)` while the block never mentions `err`, so the original message and stack are lost.

## How to review or fix

Pass `{ cause: err }`. Only a block whose single statement throws a built-in `Error` class counts. A block that uses the caught value anywhere or does anything else first (such as reporting to the user), a `catch` without a binding or with an `_` name, and domain or HTTP errors (`AppError`, Nest `*Exception`) are skipped. Fixture, e2e, test-helper and migration folders are skipped too.

Loadwise offers a reviewed edit for a direct call to the built-in `Error` with a message and a simple catch binding when the project targets ES2022 or later and includes the standard ErrorOptions library. The preview preserves the message and ordinary literal options. Review the intended error context and confirm that deployed runtimes support ErrorOptions.

## Configuration

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

```json theme={null}
{
  "rules": { "error-rethrown-without-cause": "off" }
}
```


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