DEV Community

Riven Desk
Riven Desk

Posted on

The AI PR that made the errors go away with a try/catch

I keep seeing the same shape of agent PR.

Something throws. The agent "fixes" it by wrapping the call in try/catch, logging a vague message, and returning a default. CI goes green. The PR description says "handle edge case" or "improve resilience."

What actually happened: the failure is still there. You just can't see it anymore.

The 60-second check I use now:

  1. Diff for new catch blocks (or bare except: / _ = err).
  2. Ask: does this catch rethrow, return a typed error, or fail the request loudly?
  3. If it swallows and returns nil / empty / 200 — treat it like a behavior change, not a cleanup.

Agents love silence. Reviewers should not.

I wrote the rest of my STOP list (including this one) into a free one-pager if you want the short version: https://chopragunji.gumroad.com/l/zpnmdn

If you want someone else to pressure-test an AI-heavy PR before merge, I'm doing a handful of founding Agent PR Audits at $49 here: https://chopragunji.gumroad.com/l/byoyi/FOUNDING

Top comments (0)