Skip to content
vetkitChecksChangelogDocumentation

vetkit.js.quality.useless-catch-rethrow

The catch block only rethrows the caught error, so the try/catch adds nothing.

Last updated:

Suite: Code quality

javascript, typescript

The catch block only rethrows the caught error, so the try/catch adds nothing.

Category: QUALITY · Engine rule severity: INFO

How to fix it

Remove the try/catch, or add handling (logging, wrapping with context) before rethrowing.

References

Source: packages/engine/rules/quality/javascript.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.