error-handling

Design error handling strategies for software packages and API boundaries.

3|1|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/deandum/claude-resources --skill error-handling-deandum
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling
Source: https://github.com/deandum/claude-resources/tree/main/skills/core/error-handling
Command: npx skills add https://github.com/deandum/claude-resources --skill error-handling-deandum

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Errors are inevitable in software. This skill provides a structured approach to designing error sources, propagation patterns, and review processes to ensure errors are categorized, surfaced with context, and handled gracefully.

Core Features & Use Cases

  • Classify error sources and select appropriate error types (sentinel, custom, wrapped) for clear downstream handling.
  • Define propagation paths and contextual wrapping to preserve debugging information across boundaries.
  • Map domain errors to transport-level responses at the boundary and document contracts for API surfaces.

Quick Start

Define your package's error contracts and establish propagation rules with contextual wrapping.

Frequently Asked Questions about error-handling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design error handling strategies for a software library API?

Error handling strategies involve classifying error sources, selecting appropriate error types like sentinel or custom wrapped errors, and defining propagation paths to preserve debugging context across service boundaries.

What is the best way to propagate errors across service boundaries with context?

Propagating errors across boundaries requires contextual wrapping to preserve debugging information, mapping domain errors to transport-level responses, and documenting API contracts to ensure clear downstream handling.

When should I use sentinel errors versus custom wrapped errors in API development?

Sentinel errors are used for clear downstream handling of specific expected conditions, while custom wrapped errors are used to propagate and enrich errors with contextual debugging information across package boundaries.

How do I map domain errors to transport-level API responses?

Mapping domain errors to transport responses is done at the boundary by translating internal error categories into appropriate transport-level responses and documenting these error contracts for the API surface.

Does this error handling approach work for both library design and service boundary development?

Yes, the error handling approach applies to both library design and service boundary development by enforcing error categorization, propagation rules, and boundary mapping to handle errors gracefully across software packages.