effect-patterns-error-management

Provides reusable typed solutions for handling exceptions and errors in Go applications.

785|26|Updated Jun 22, 2025
One-click install
npx skills add https://github.com/PaulJPhilp/EffectPatterns --skill effect-patterns-error-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-patterns-error-management
Source: https://github.com/PaulJPhilp/EffectPatterns/tree/main/config/.claude-plugin/plugins/effect-patterns/skills/effect-patterns-error-management
Command: npx skills add https://github.com/PaulJPhilp/EffectPatterns --skill effect-patterns-error-management

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a curated set of Effect-TS error management patterns, enabling type-safe, declarative handling of failures, recoveries, and resilience across complex pipelines.

Core Features & Use Cases

  • Typed error modeling with tagged errors and ADTs.
  • Comprehensive error handlers: catchAll, catchTag, catchTags, and matchTag/matchTags for precise recovery.
  • Error normalization and mapping with mapError to preserve architectural boundaries.
  • Declarative retry and timeout control via Schedule, retry, and timeout.
  • Structured logging and observable failure analysis for robust debugging.
  • Use cases span Effect-TS workflows involving Option, Either, and domain errors, including retry scenarios and graceful degradation.

Quick Start

Try a simple scenario: fetch a user, trigger NotFoundError, recover with a default user using catchTag, and log the result.

Frequently Asked Questions about effect-patterns-error-management

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

FAQPage Schema
How do I handle tagged errors in Effect-TS?

Handle tagged errors in Effect-TS using pattern matching with catchTag and catchTags for precise recovery. This enables type-safe, declarative recovery from domain-specific failures without catching unrelated errors.

How do I configure retry and timeout schedules in Effect-TS?

Configure retry and timeout in Effect-TS declaratively using Schedule-based functions. You define custom retry policies and timeout constraints to build resilient pipelines that automatically recover from transient failures or halt long-running operations.

What is the best way to normalize errors across Effect-TS pipeline boundaries?

Normalize errors across Effect-TS pipeline boundaries using mapError to transform and translate failures. This preserves architectural boundaries by ensuring internal tagged errors do not leak into external API contracts.

Can I use catchAll to recover from all failure types in an Effect-TS workflow?

Yes, you can use catchAll to recover from all failure types in an Effect-TS workflow. It provides a comprehensive fallback mechanism when you need generic error handling rather than matching specific tagged errors with catchTag.

Does Effect-TS support structured logging for error analysis?

Yes, Effect-TS supports structured logging for observable failure analysis and robust debugging. Integrating logging into error handling patterns allows you to trace retry attempts, timeouts, and domain-specific recoveries across complex workflows.