← all rules

code/ai-empty-catch

Empty catch block swallows errors

lowAI-generated codeai-generatedCWE-703js

What it detects

An empty `catch {}` discards the error, masking failures (including security-relevant ones) and making incidents undebuggable. At minimum log the error; handle or rethrow it where it matters.

How it runs

Applied line-by-line across source files, INCLUDING comments (the disclaimers and TODO markers are the signal). Matches placeholder credential literals, deferred-security TODO/FIXME comments, "not for production" disclaimers, and swallowed exceptions. The detector's own rule prose is skipped so the scanner doesn't flag itself.

Found a false positive or want this rule tuned? File an issue. You can also suppress per-repo via a .repoguardignore line.