code-errors
CommunityMake failures safe, typed, and user-friendly.
Software Engineering#security#error handling#supabase#typed errors#zod validation#react error boundary#api error response
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
AppErrorplus domain-specific errors (e.g.,ValidationError,NotFoundError,AuthError) with predictablecodeandstatusCode. - Boundary validation with Zod: validate external inputs using
safeParse, fail fast, and infer types from schemas for correctness. - Supabase failure mapping: check
.errorbefore using.dataand translate common Supabase error codes into the right error types. - React route-level error boundaries: implement
ErrorBoundaryto 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 requiredComponents
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.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.