What it flags
Acatch (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: