Error Management

Model typed errors and recovery strategies in Effect-TS projects.

8|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/andrueandersoncs/claude-skill-effect-ts --skill error-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Error Management
Source: https://github.com/andrueandersoncs/claude-skill-effect-ts/tree/main/skills/error-management
Command: npx skills add https://github.com/andrueandersoncs/claude-skill-effect-ts --skill error-management

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Effect-TS applications encode domain errors and defects differently, leading to brittle error handling. This skill provides patterns and conventions to model recoverable errors with typed error channels, differentiate defects, and compose robust error handling across effects.

Core Features & Use Cases

  • Create Typed Errors with Schema.TaggedError and explicit Error types for domain failures.
  • Catch and recover using Effect.catchAll, Effect.catchTag, and Effect.catchTags; aggregate errors with Effect.all and Effect.validate.
  • Transform and map errors with Effect.mapError and Effect.mapBoth; compose fallback strategies via Effect.orElse and Effect.orElseSucceed.
  • Reason about defects, sandboxing, and retry/timeouts to build resilient async workflows.
  • Use best practices to maintain clear error boundaries, testability, and predictable failure modes.

Quick Start

  • Define a typed error (e.g., UserNotFound) and demonstrate a recoverable path via catchTag, with a fallback value when the error occurs.

Frequently Asked Questions about Error Management

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

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

Handle recoverable errors in Effect-TS by defining typed errors with Schema.TaggedError and catching them using Effect.catchAll or Effect.catchTag to isolate specific failure modes. You can also recover via fallback strategies using Effect.orElse.

What is the difference between defects and typed errors in Effect-TS?

Defects in Effect-TS represent unrecoverable failures, while typed errors model expected domain failures on the error channel. Sandboxing allows you to catch defects and convert them into typed errors for recovery.

How do I accumulate multiple errors in Effect-TS?

Accumulate multiple errors in Effect-TS by using Effect.all or Effect.validate to run effects in parallel and collect all failures instead of short-circuiting on the first error encountered.

How do I implement retry and timeout strategies in Effect-TS?

Implement retry and timeout strategies in Effect-TS by combining typed error handling with built-in scheduling operators to build resilient asynchronous workflows that automatically recover from transient failures.

Can I transform error types in Effect-TS?

Transform error types in Effect-TS using Effect.mapError to alter the error channel or Effect.mapBoth to transform both success and error channels simultaneously while maintaining predictable failure modes.

Does Effect-TS support catching errors by specific tags?

Effect-TS supports catching errors by specific tags using Effect.catchTag for individual tagged errors or Effect.catchTags to handle multiple distinct tagged errors within a single effect pipeline.