architect-error-handling

Design error handling for multi-step operations and service interactions.

1|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/gjalla/gjalla-plugin --skill architect-error-handling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architect-error-handling
Source: https://github.com/gjalla/gjalla-plugin/tree/main/claude/skills/architect-error-handling
Command: npx skills add https://github.com/gjalla/gjalla-plugin --skill architect-error-handling

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many implementations treat error handling as an afterthought, producing inconsistent logs, unclear caller behavior, unsafe retries, and partial failures that leave systems in unknown states; this Skill helps design error handling up front so failures are detected, contained, observable, and recoverable.

Core Features & Use Cases

  • Error boundary decisions: Guidance on where to catch, translate, or let errors propagate across controllers, services, and infrastructure.
  • State and recovery strategies: Patterns for atomic operations, idempotency keys, compensating actions, sagas, and documenting partial-failure recovery.
  • Caller and operator contracts: Recommendations for API error formats, retry categorization (retryable vs non-retryable), logging/alerting context, and a PR attestation template to communicate decisions.
  • Use Case: Designing error handling for a Create Order flow that involves payment, inventory reservation, and shipment creation so that failures either roll back safely or allow systematic recovery.

Quick Start

Create an error handling summary for the Create Order flow that lists where to catch errors, the state guarantees (atomic/idempotent/compensating), retry rules, and a short attestation for the PR.

Frequently Asked Questions about architect-error-handling

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

FAQPage Schema
How do I design error handling for multi-step distributed transactions?

Design error handling for distributed transactions by defining catch locations across controllers and services, applying state guarantees like idempotency and compensating actions, and setting retry policies with backoff for partial-failure recovery.

What is the best way to handle partial failures in a multi-step service flow?

Handle partial failures in a multi-step service flow by implementing state recovery strategies such as sagas, compensating actions, and idempotency keys to ensure failures either roll back safely or allow systematic recovery.

How do I decide where to catch errors across service layers and infrastructure?

Decide where to catch errors across service layers by establishing explicit error boundary decisions that determine whether to catch, translate, or let errors propagate from controllers through services to infrastructure.

How do I categorize API errors as retryable or non-retryable for callers?

Categorize API errors for callers by defining caller-facing error formats and retry rules that explicitly distinguish between retryable and non-retryable failures, ensuring consistent client behavior and observability.

When do I need compensating actions and idempotency keys for error recovery?

You need compensating actions and idempotency keys when designing error recovery for multi-step operations that require safe rollback or systematic recovery, ensuring operations remain atomic and preventing duplicate side effects during retries.

How do I document error handling decisions for a pull request review?

Document error handling decisions for a pull request by producing a short PR attestation that summarizes catch locations, state guarantees, retry policies, and caller-facing error formats to communicate design choices clearly to reviewers.