Will It Vibe logoWill It Vibe?
PY-002Medium severity-8 points

Broad exception silently swallowed

Part of Code Quality & Syntax, which counts for 20% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.

What it detects

except Exception:/except BaseException: whose entire body is pass or continue discards every error with no log, trace, or re-raise.

Why it matters

An except Exception: (or except BaseException:) block whose entire body is pass or continue discards every error with zero trace: no log line, no metric, no re-raise. In production this turns real failures such as a database timeout or a malformed response into silent no-ops, so the system looks healthy while it is actually failing, and the bug report becomes 'it just doesn't work sometimes' with no lead to follow. This is a well known anti-pattern (Bandit rules B110/B112) precisely because it is easy to write during a rushed fix and expensive to debug later.

How to fix it

At minimum, log the exception with enough context to act on it later, for example logger.exception("failed to sync record %s", record_id). If the failure is truly expected and safe to ignore (a best-effort cache warm, an optional integration), narrow the except to the specific exception type you expect and add a one-line comment explaining why it is safe to ignore.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Code Quality & Syntax checks