# Review Error Handling Fundamentals

Poor error handling hides failures, confuses users, and slows production debugging. This skill guides reviews toward clear messages, recovery paths, and useful logs.

## Install

```bash
npx skillstore add danielpodolsky/error-handling-fundamentals
```

## Metadata

- Status: approved
- Slug: danielpodolsky-error-handling-fundamentals
- Skillstore revision: r1
- Version status: missing
- Tree hash: b21ff9376e18171f0d75fa60919688f6950bee6e183090a118baf7e253366f41
- Author: DanielPodolsky
- GitHub username: DanielPodolsky
- License: MIT
- Repository: https://github.com/DanielPodolsky/mentor-spec/tree/main/.claude/skills/fundamentals/error-handling
- Ref: 34f316ba14ef36c7a620fc09f2676d2429997a77
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network, filesystem
- Quality score: 79
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/danielpodolsky-error-handling-fundamentals
- Manifest: https://skillstore.pages.dev/api/skills/danielpodolsky-error-handling-fundamentals/manifest

## Capabilities

- Reviews try and catch blocks for empty catches, bad scope, cleanup, and missing context.
- Checks API and network error handling for retries, fallbacks, and status-aware messages.
- Evaluates user-facing error messages for clarity, next steps, and privacy.
- Flags stack trace exposure and technical details in API responses.
- Guides mentors with review questions for junior developers.

## Use Cases

- Review Form Failures: Check form submission flows for helpful validation, loading cleanup, and retry guidance.
- Harden API Errors: Review API responses so internal details stay private and clients receive useful messages.
- Coach Junior Reviews: Use focused questions to help developers reason about error scope, logging, and recovery.

## Prompt Templates

### Check a Catch Block

```
Review this try and catch block. Identify empty catches, unclear user messages, missing cleanup, and missing debug context.
```

### Review API Error Responses

```
Review this API error flow. Check whether it leaks technical details, logs useful context, and returns actionable messages.
```

### Assess Async Recovery

```
Review this async operation. Evaluate retry behavior, fallback values, loading states, and when errors should propagate.
```

### Audit a Failure Path

```
Audit this feature failure path end to end. Prioritize user impact, privacy, logging quality, cleanup, retries, and graceful degradation.
```

## Limitations

- Provides review guidance only; it does not run code or verify production behavior.
- Examples focus mainly on JavaScript, TypeScript, React, forms, and API flows.
- Retry guidance is general and does not replace service-specific resilience design.
- Project logging standards may be needed for final implementation choices.

## Best Practices

- Catch errors at the layer that can add context, recover, or present a useful message.
- Log diagnostic details for developers while keeping user-facing messages clear and private.
- Use cleanup paths so loading, locks, and temporary state are restored after failures.

## Anti Patterns

- Ignoring errors with empty catch blocks or silent null returns.
- Showing stack traces, raw exception messages, or jargon to end users.
- Retrying failures without limits, feedback, or a fallback plan.

## Security Audit

- Audited at: 2026-07-06T09:20:55.249\+00:00
- Summary: All static findings are false positives caused by Markdown code fences, inline code syntax, and non-executed educational examples. No prompt injection, data exfiltration intent, command execution path, or real filesystem access was found in SKILL.md.

## Stats

- Views: 238
- Downloads: 10
- Favorites: 0
- Popularity score: 0
