Skip to content
Back to skills

Error Handling

ASecurity

Consistent error handling: typed errors, propagation rules, user-facing messages, logging and retries.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentsapibackend

Works with

  • api

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add karthikrshet/saarthi --skill error-handling --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Error Handling?

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

Security grade badge for Error Handling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/karthikrshet-error-handling/badge)](https://www.skillsdirectory.com/skills/karthikrshet-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: error-handling
description: "Consistent error handling: typed errors, propagation rules, user-facing messages, logging and retries."
tags: [core, quality, backend]
---

# Error Handling

## When to use

- Designing a module or API
- Reviewing try/catch-heavy code

## Procedure

1. Define domain error types
2. Handle errors where you can act; otherwise propagate with context
3. Map errors to user-facing responses at the boundary
4. Log once with correlation ID
5. Retry only idempotent operations with backoff and jitter

## Checklist

- [ ] No swallowed errors
- [ ] No stack traces to end users
- [ ] Retries bounded

## Anti-patterns

- catch (e) {}
- Logging the same error at every layer
- Retrying non-idempotent writes

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.