# Improve Application Error Handling

Inconsistent error handling can hide failures and confuse users. This skill guides Claude, Codex, and Claude Code toward clear exceptions, validation, cleanup, and recovery paths.

## Install

```bash
npx skillstore add eis-its/global-error-handling
```

## Metadata

- Status: approved
- Slug: eis-its-global-error-handling
- Skillstore revision: r1
- Version status: missing
- Tree hash: 11c118fa4ea66aa4f121e8c5be5213ea3d7b316e6291ab3a5b0ce574e4443b73
- Author: EIS-ITS
- GitHub username: EIS-ITS
- License: MIT
- Repository: https://github.com/EIS-ITS/vss-cli/tree/main/.claude/skills/global-error-handling
- Ref: 72d5025b022c77f7a51bdf5c1637c689c80e89d1
- 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: filesystem
- Quality score: 79
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/eis-its-global-error-handling
- Manifest: https://skillstore.pages.dev/api/skills/eis-its-global-error-handling/manifest

## Capabilities

- Guides try-catch and exception handling decisions.
- Promotes specific exception types instead of generic failures.
- Encourages fail-fast input validation and precondition checks.
- Supports API error responses and centralized error middleware.
- Covers retry strategies, graceful degradation, and cleanup logic.

## Use Cases

- Harden API Failure Paths: Review API handlers for validation, typed errors, safe responses, retries, and cleanup.
- Add Frontend Error Boundaries: Design user-friendly fallback behavior for React or similar frontend components.
- Standardize Team Error Patterns: Apply one error handling approach across services, tools, and shared libraries.

## Prompt Templates

### Review Basic Error Handling

```
Use the global-error-handling skill to review this function for missing validation, unclear errors, and cleanup gaps.
```

### Design API Error Responses

```
Use the global-error-handling skill to design consistent API error responses for validation, authorization, dependency, and unexpected failures.
```

### Refactor Exception Flow

```
Use the global-error-handling skill to refactor this module so it uses specific exception types, preserves causes, and avoids swallowing errors.
```

### Plan Resilient Service Failure Handling

```
Use the global-error-handling skill to create an error strategy for retries, timeouts, fallback behavior, monitoring, and resource cleanup.
```

## Limitations

- Provides guidance, not a runnable error handling framework.
- Does not include language-specific implementation files.
- Depends on the agent applying the referenced standards correctly.
- The detailed standard is linked outside the skill directory.

## Best Practices

- Validate inputs and preconditions before starting side effects.
- Use specific error types and preserve the original cause.
- Clean up resources in finally blocks or equivalent mechanisms.

## Anti Patterns

- Catching all exceptions and continuing without action.
- Showing internal stack traces or secrets to end users.
- Retrying every failure without limits or classification.

## Security Audit

- Audited at: 2026-07-06T12:11:54.285\+00:00
- Summary: The static path traversal signal is a markdown documentation link, not executable filesystem access. No prompt injection, data exfiltration intent, or malicious behavior was found in SKILL.md.

## Stats

- Views: 208
- Downloads: 9
- Favorites: 0
- Popularity score: 0
