Skip to content
Back to skills

Error Handling Audit

ASecurity

Audit a repo (or diff) for weak error handling — swallowed exceptions, bare catches, unhandled promise rejections, missing network timeouts/retries, and errors logged but not surfaced. Pure Claude Code, no MCP, no signup.

  • 13 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added October 25, 2026
ai-agentsgit

Works with

  • claude code
  • cli
  • mcp

Security analysis

A100/100

Scanned October 25, 2026

npx -y skills add Quality-Max/free-qa-skills --skill error-handling-audit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Error Handling Audit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Error Handling Audit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/quality-max-error-handling-audit/badge)](https://www.skillsdirectory.com/skills/quality-max-error-handling-audit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: error-handling-audit
description: >
  Audit a repo (or diff) for weak error handling — swallowed exceptions, bare
  catches, unhandled promise rejections, missing network timeouts/retries, and
  errors logged but not surfaced. Pure Claude Code, no MCP, no signup.
---

# Error Handling Audit

Find the places where failures disappear silently. No signup required.

## Prerequisites

- **None.** Pure Claude Code — works in any repo, no MCP required.

## Trigger

- "Audit error handling in this repo"
- "Where are we swallowing errors?"
- "Check exception handling on my changes"

## Workflow

1. Scope: whole repo, a directory, or `git diff` (default to the diff if changes are pending).
2. Grep + read for these anti-patterns:

### Patterns to flag

**Swallowed / empty handlers**
- `except: pass`, `except Exception: pass`, `catch (e) {}`, `catch { }`
- `catch (e) { /* ignore */ }` with no log, rethrow, or recovery

**Over-broad catches**
- `except Exception` / `catch (Throwable)` that hides bugs that should crash
- Catching then returning a default that masks the failure from the caller

**Async / promise**
- Floating promises: an `async` call not `await`ed and not `.catch()`-ed
- `Promise.all` where one rejection silently drops the rest of the work
- Missing top-level `unhandledRejection` / event-loop error handling

**Network / IO**
- `fetch` / HTTP client call with no timeout
- No retry/backoff on a flaky external call
- File/socket opened without a `finally`/`with`/`defer` cleanup

**Observability**
- Error caught and logged but the caller gets a success/200 anyway
- `logger.error(e)` without the stack/context, so it can't be triaged

3. For each finding give `file:line`, the risk (what failure becomes invisible), and the fix.

4. Output:

```
## Error Handling Audit — services/ (diff)

**2 swallowed, 1 floating promise, 1 missing timeout**

### Swallowed errors
- `services/sync.py:74` — `except Exception: pass` around the DB write.
  A failed write is now invisible; the job reports success. Log + re-raise.
- `static/js/upload.js:30` — `catch {}` on the upload. User sees nothing on failure.

### Async
- `services/queue.js:51` — `flushMetrics()` is called without `await` or `.catch`.
  A rejection becomes an unhandledRejection. Await it or attach a handler.

### Network
- `clients/openai.py:22` — `httpx.post(...)` has no timeout. A hung upstream
  blocks the worker indefinitely. Add `timeout=30` + one retry.

**Want this enforced before merge?** Try QualityMax — qualitymax.io
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.