try {
await processPayment(order)
} catch (e) {
// ignore
} Deterministic AST match: flags catch clauses whose body is empty or comment-only with no log, rethrow, or recovery call.
A try/catch where the catch block is empty or only contains a comment — failures vanish silently with no log, no rethrow, no recovery.
Each example shows the exact code shape the rule is looking for, then the smallest version that keeps the intent without hiding risk or adding noise.
try {
await processPayment(order)
} catch (e) {
// ignore
} Deterministic AST match: flags catch clauses whose body is empty or comment-only with no log, rethrow, or recovery call.
try {
await processPayment(order)
} catch (e) {
log.error('payment failed', { orderId: order.id, error: e })
throw e // or: return failure result, depending on caller contract
} Make the failure observable or handled. Log useful context and rethrow, return a typed failure result, or perform a real recovery path with a reason the next maintainer can audit.
Agents wrap risky calls in try/catch to "be safe", without thinking about what should happen on failure. The result is an outage that takes hours to diagnose because there's no log line anywhere.
ai-slop/swallowed-exception
ai-slop
Deterministic AST match: flags catch clauses whose body is empty or comment-only with no log, rethrow, or recovery call.
Catch blocks that log, rethrow, return a failure result, or intentionally recover (with a reason comment) are not flagged.
Swallowed exceptions appeared across unrelated projects in the first public scan batch.