code-errors

Community

Make failures safe, typed, and user-friendly.

Authorjjmendezrodriguez
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Prevents confusing, unsafe failure states by turning unpredictable runtime errors into consistent, user-safe responses with complete logs for developers.

Core Features & Use Cases

  • First-class error handling: catch specific errors, never swallow them, and avoid exposing stack traces, internal paths, or secrets.
  • Typed custom error hierarchy: use AppError plus domain-specific errors (e.g., ValidationError, NotFoundError, AuthError) with predictable code and statusCode.
  • Boundary validation with Zod: validate external inputs using safeParse, fail fast, and infer types from schemas for correctness.
  • Supabase failure mapping: check .error before using .data and translate common Supabase error codes into the right error types.
  • React route-level error boundaries: implement ErrorBoundary to show friendly UI while logging detailed component stacks.
  • Consistent API error responses: return a stable { type, message, errors? } shape without leaking sensitive details.

Quick Start

Ask the AI: implement typed Zod boundary validation, map Supabase .error codes to custom AppError subclasses, and wire a React ErrorBoundary with a consistent API error response format.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: code-errors
Download link: https://github.com/jjmendezrodriguez/jm-claude-plugin/archive/main.zip#code-errors

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.