Will It Vibe?
CQ-010Low severity-4 points

Overly broad exception handling

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

What it detects

Catching the base Exception type hides bugs that should surface, and should generally be narrowed or re-raised.

Why it matters

except Exception (or a bare except) catches everything, including programming errors like TypeError and AttributeError that should crash loudly during development. In production it converts those bugs into silent misbehavior, and a bare except even swallows KeyboardInterrupt and SystemExit.

How to fix it

Narrow each handler to the exceptions the tried code can realistically raise (ValueError, KeyError, requests.RequestException, and so on). Where a broad catch is legitimate at a top-level boundary such as a request handler or worker loop, log with logging.exception and re-raise or convert to a clean error response. Ruff rules BLE001 and E722 flag new ones.

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