DevMeth
R10

AI code debt

Swallowed Errors Check — Are Your Error Handlers Doing Nothing?

DevMeth checks the 48 known AI-code failure patternsnot a penetration test or a security guarantee.

What the issue is

An empty catch block or a no-op `.catch(() => {})` consumes an error and produces nothing: no log, no retry, no user message. The operation silently stops happening, which turns every failure into a mystery with no timestamp.

Why AI tools generate it

The fastest way for an agent to satisfy a linter or silence an unhandled promise is an empty catch. It looks resolved, so the agent moves on — and the error handling that should exist is never written.

How DevMeth detects it

The scan locates every catch block in your source files and walks each body: if it contains no statement (comments do not count), the handler is flagged, along with any `.catch(() => {})` chain.

R10
What a finding looks like
Medium

Errors are being swallowed — empty catch blocks and no-op .catch() handlers

WHAT WE FOUND

lib/sync.tscatch (err) { } — the error is swallowed

Sample — illustrative and masked exactly as a real report shows it. Run a free scan to see your own results.

The fix, in three steps

Give every flagged handler a real job — log with context, retry, fall back, or rethrow. An empty handler is not handling; the re-scan checks for statements, not intent.

Run a free scan and each finding carries a paste-ready fix prompt you can act on.

Maintainability findings ship in the Rescue Report — bundled with the Launch Pack or available on its own.

Try a free scan

FAQ

Can a swallowed error be harmless?

It can be — for an optional cosmetic action, swallowing is a deliberate choice. But the scan still flags it, because an empty handler carries no signal about whether the swallowing was a decision or an omission.

Does a comment inside the catch count as handling?

No. The scan only counts statements. A comment explaining a swallowed error is still a swallowed error — move that explanation into a log line that records what actually happened.

Where do swallowed errors hurt most?

In write paths: database upserts, webhooks, background jobs. Those fail silently for days, and by the time someone notices, the retry window is gone.

DevMeth checks the 48 known AI-code failure patternsnot a penetration test or a security guarantee. A clear result means each known pattern was checked and found clear or not applicable for your app; it is not a guarantee of security.