Skip to content
Back to skills

Review Error Handling

ASecurity

Reviews failure paths for swallowed errors, lost context, unsafe retries, missing timeouts and internal details leaking to users, with ranked fixes. Use on code that calls I/O or external services.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 26, 2026
ai-agentsjavascriptpythonrustgojavasqlcode-reviewdatabasesecurity

Security analysis

A100/100

Scanned November 26, 2026

npx -y skills add hermes-hq/hodios-dist --skill review-error-handling --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Review Error Handling?

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

Security grade badge for Review Error Handling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hermes-hq-review-error-handling/badge)](https://www.skillsdirectory.com/skills/hermes-hq-review-error-handling)

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: review-error-handling
description: Reviews failure paths for swallowed errors, lost context, unsafe retries, missing timeouts and internal details leaking to users, with ranked fixes. Use on code that calls I/O or external services.
license: CC0-1.0
arguments:
  - code
  - language
argument-hint: <code> [language]
disable-model-invocation: true
metadata:
  version: 1.0.0
  kind: prompt
  category: code-review
  source: https://hermes-ide.com/prompts/review-error-handling
  catalog: 2026.1014.1
---

# Review error handling

## Inputs

- `code` (required): The code, diff or file paths to review.
- `language` (optional): Language and framework, if not obvious from the code.

Arguments fill these in order. If a required value is empty, take it from the user’s message or ask for it once.

<context>
Error-handling defects stay invisible until production: an empty catch turns an outage into silent data loss, a retry loop around a non-idempotent call charges a customer twice, a missing timeout lets one slow dependency exhaust every worker, and a raw exception message shows a SQL query to an end user. General code review tends to skim these paths because the happy path is where the change is. This review reads only the failure paths, and reports each finding with the concrete failure it causes.
</context>

<task>
Review the error handling in:
$code
Only if language was provided: Language and framework: $language

For every call that can fail (I/O, network, database, parsing, external services, user input), follow what happens on failure and check:
1. **Swallowed errors:** empty catch or except blocks, ignored return values or error results, promises without a rejection handler, `catch` that logs and continues where the caller needs to know, fallbacks that hide failure (returning an empty list on error).
2. **Overly broad handling:** catching the base exception type or all errors where a specific one was meant, catching programming errors (null dereference, type errors) along with expected ones.
3. **Lost context:** rethrowing without the cause, replacing an error with a vaguer one, messages without the identifiers needed to debug (which order, which file), logging an error and also rethrowing it so it is logged twice.
4. **Leaks to users:** stack traces, SQL, file paths, hostnames or internal error text in responses or UI; inconsistent error formats or status codes for the same failure.
5. **Unsafe retries:** retrying non-idempotent operations without an idempotency key, no cap, no exponential backoff with jitter, retrying errors that are not transient (4xx, validation), retries nested at several layers.
6. **Timeouts and cancellation:** outbound calls without timeouts, timeouts longer than the caller's, cancellation not propagated.
7. **Cleanup and consistency:** resources not released on the error path (files, connections, locks), partial writes left behind, a multi-step operation that fails halfway with no rollback or compensation.
8. **Crash versus continue:** continuing after a failure that leaves the process in an invalid state, or crashing on a recoverable, expected error.

Rank findings by impact: data loss or corruption, then money or security, then outage, then debuggability.
</task>

<constraints>
- Each finding needs a location and a concrete failure scenario. If you cannot describe the input or condition that triggers it, drop it.
- Report at most 12 findings. Do not comment on style, naming or the happy path.
- Fixes must follow the language's idioms (wrapping with a cause, `errors.Is`/`%w` in Go, `raise … from` in Python, `Result` in Rust, `cause` in JavaScript) and the project's existing error types if visible.
- Read the relevant code before making a claim about it. Do not guess what a file, function or config contains.
- If the information you need is not available, say what is missing and how to get it instead of inventing it.
</constraints>

<output_format>
## Summary
One or two sentences: overall state and the most serious risk.
## Findings
Numbered, most severe first. Each: `location` — category from the list above — what happens on failure (the scenario) — impact.
## Fixes
For the top findings, a short code snippet of the corrected handling.
## What is done well
Bullets, or "Nothing notable".
</output_format>

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.