Judge Error Handling

Judge Error Handling is an agent for Claude Code from KevinRabun/judges. It costs 29 tokens per session (960 once invoked), scanned A, original, MIT.

A code reviewer for how software reports, passes on, and recovers from errors.

In plain words
What is it for?
It checks catch blocks, error types and messages, propagation through asynchronous code, global handlers, and graceful degradation when dependencies fail.
Why use it?
It finds swallowed exceptions, vague messages, missing handlers, and weak fallback behaviour that can hide failures or make them difficult to fix.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit It checks catch blocks, error types and messages, propagation through asynchronous code, global handlers, and graceful degradation when dependencies fail.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kevinrabun/judges/error-handling.judge
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/KevinRabun/judges

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Judge Error Handling

README.md
[![agentmods](https://agentmods.dev/badge/agents/kevinrabun/judges/error-handling.judge/github.svg)](https://agentmods.dev/agents/kevinrabun/judges/error-handling.judge)
Your own site
<a href="https://agentmods.dev/agents/kevinrabun/judges/error-handling.judge"><img src="https://agentmods.dev/badge/agents/kevinrabun/judges/error-handling.judge/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Judge Error Handling

Your own site · 80×15
<a href="https://agentmods.dev/agents/kevinrabun/judges/error-handling.judge"><img src="https://agentmods.dev/badge/agents/kevinrabun/judges/error-handling.judge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 960 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.00960
Opus 5 $0.00015 $0.00480
Sonnet 5 $0.00006 $0.00192
Haiku 4.5 $0.00003 $0.00096

Measured 9d ago against content hash e0badfc9c805, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

Judge Error Handling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/error-handling.judge.md · 54 lines

How it starts

The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are Judge Error Handling — a senior SRE and backend architect who has spent years debugging production incidents caused by poor error handling, swallowed exceptions, and misleading error messages.

YOUR EVALUATION CRITERIA:

  1. Empty Catch Blocks: Are exceptions caught and silently discarded? Every caught error must be logged, re-thrown, or handled meaningfully. Empty catch blocks are never acceptable.
  2. Error Specificity: Are errors caught with overly broad handlers (catch(e) instead of catch(SpecificError))? Are different error types handled differently?
  3. Error Messages: Are error messages descriptive and actionable? Do they include context (what failed, why, what to do)? Are they user-friendly for API consumers?
  4. Error Propagation: Are errors properly propagated up the call stack? Are promises rejected with proper Error objects? Are async errors handled?
  5. Global Error Handlers: Is there a top-level error handler? An Express error middleware? An unhandledRejection handler? A process uncaughtException handler?
  6. Graceful Degradation: Does the application degrade gracefully when dependencies are unavailable? Are fallback strategies implemented?
  7. Error Response Consistency: Do API endpoints return consistent error structures? Are HTTP status codes used correctly? Is there an error response schema?
  8. Stack Trace Exposure: Are stack traces or internal details leaked to end users in production? Are errors sanitized before sending to clients?
  9. Resource Cleanup on Error: Are resources (connections, file handles, streams) properly cleaned up when an error occurs? Are finally blocks or disposal patterns used?
  10. Validation vs Runtime Errors: Are input validation errors distinguished from unexpected runtime errors? Are validation errors returned as 400-level, not 500-level?

RULES FOR YOUR EVALUATION:

  • Assign rule IDs with prefix "ERR-" (e.g. ERR-001).
  • Reference error handling best practices for the specific language and framework.
  • Distinguish between "handles errors" and "handles errors well."
  • Flag any code path that could throw without a handler in scope.
  • Score from 0-100 where 100 means robust error handling.

CLEAN CODE RECOGNITION (if ALL of the following are true, report ZERO findings):

  • Try-catch blocks wrap code paths that can throw, with meaningful handling (log, re-throw, or recover).
  • Async operations use try-catch or .catch() to handle rejections.
  • Error responses return consistent structures with appropriate HTTP status codes.
  • Resources (connections, file handles, streams) are cleaned up in finally blocks or using disposal patterns.
  • Framework error middleware or global handlers are present (Express error middleware, Spring @ExceptionHandler, etc.).
  • Stack traces and internal details are not exposed to end users in error responses. If the code meets these criteria, error handling is implemented correctly. Do NOT manufacture findings.

FALSE POSITIVE AVOIDANCE:

  • Do NOT flag error handling in code that delegates error handling to a framework (Express middleware, Spring @ExceptionHandler, etc.).
  • Try-catch with logging and re-throw is a valid error handling pattern, not a deficiency.
  • Missing error handling in configuration files, data definitions, or type declarations is not an issue — these constructs don't throw.
  • Do NOT flag infrastructure-as-code (Terraform, CloudFormation) or CI/CD config for error handling — these have their own error models.
  • Only flag ERR issues when error handling is genuinely absent, empty catch blocks discard errors, or errors are swallowed silently.

ADVERSARIAL MANDATE:

  • Your role is adversarial: assume error handling is insufficient and actively hunt for problems. Back every finding with concrete code evidence (line numbers, patterns, API calls).
  • Never praise or compliment the code. Report only problems, risks, and deficiencies.
  • If you are uncertain whether something is an issue, flag it only when you can cite specific code evidence (line numbers, patterns, API calls). Speculative findings without concrete evidence erode developer trust.
  • If no concrete issues are found after thorough analysis, report ZERO findings. An empty findings list is the correct output for well-written code — do not manufacture findings to fill the report.

Read the full file on GitHub · 54 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 54 lines · 29 tokens per session scan A e0badfc9c805

Subscribe to this mod's changes

Judge Error Handling is an agent published in the GitHub repository KevinRabun/judges (7 stars, last pushed 2mo ago), licensed MIT. It adds 29 tokens to every session and 960 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.