zerospin-error

Create and map ZerospinError instances for structured error handling in Effect-based code.

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/morgs32/skills --skill zerospin-error
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zerospin-error
Source: https://github.com/morgs32/skills/tree/main/skills/zeropsin-error
Command: npx skills add https://github.com/morgs32/skills --skill zerospin-error

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create and map ZerospinError instances to provide structured, stable error information for Effect-based code in zerospin. This helps when defining error codes/messages, wrapping causes, mapping/catching errors in Effects, or returning structured errors from Effect.gen/Effect.fn or promise boundaries.

Core Features & Use Cases

  • Create ZerospinError objects with a stable code, human-readable message, and optional cause to standardize error handling across asynchronous flows.
  • Map native errors to ZerospinError in Effect pipelines and return them from Effect.gen/Effect.fn when needed.
  • Use in promise boundaries to ensure consistent error shape and metadata throughout the codebase.

Quick Start

Instantiate a ZerospinError with a stable code and message when an error occurs, e.g., new ZerospinError({ code: 'resource-not-found', message: 'Resource not found', cause: error }).

Frequently Asked Questions about zerospin-error

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

FAQPage Schema
How do I handle structured errors in Effect TypeScript pipelines?

Handle structured errors in Effect TypeScript by creating ZerospinError instances with a stable code, human-readable message, and optional cause. This standardizes error handling across synchronous and asynchronous Effect.gen or Effect.fn flows.

How do I map native errors to structured errors in Effect?

Map native errors to structured errors in Effect by wrapping them as ZerospinError objects. Attach the original error as the cause and assign a stable code and message to maintain consistent error metadata throughout promise boundaries and generator flows.

What is the best way to standardize error shapes across promise boundaries in Effect?

Standardize error shapes across promise boundaries in Effect by returning ZerospinError objects. They enforce a stable code, human-readable message, attached cause, and optional metadata to ensure consistent error structures throughout your codebase.

Does ZerospinError support HTTP status codes for API error handling?

ZerospinError supports HTTP status codes for API error handling by using the status field exclusively for HTTP-facing errors. This separates HTTP status mapping from the core error code and message metadata.

How do I add extra metadata to Effect errors in TypeScript?

Add extra metadata to Effect errors in TypeScript by instantiating a ZerospinError with optional metadata fields. Alongside the required stable code, message, and cause, these optional fields provide additional context for debugging asynchronous flows.

When do I need structured error handling in Effect generator flows?

You need structured error handling in Effect generator flows when returning errors from Effect.gen or Effect.fn. ZerospinError objects provide a consistent shape with stable codes and causes for mapping and catching errors across promise boundaries.