aj-geddes avatar

Api Error Handling

This gives you a complete error handling system with standardized response formats, custom error classes, and observability built in. You get a full ERROR_CODES map, middleware for Express and Flask, retry strategies with exponential backoff, circuit breaker patterns, and Sentry integration. The guides cover everything from basic validation errors to production monitoring with error rate metrics. Use it when you're tired of inconsistent error responses across your API or when debugging production issues without proper request tracing. The best part is the field validation approach that returns all errors at once instead of making clients fix them one at a time.

skills.sh installs
513
GitHub stars
379
last updated
Aug 21, 2026

Install

$ npx -y skills add aj-geddes/useful-ai-prompts --skill api-error-handling --agent claude-code

Installs into .claude/skills of the current project.

Files

API Error Handling

Table of Contents

Overview

Build robust error handling systems with standardized error responses, detailed logging, error categorization, and user-friendly error messages. This skill covers the full lifecycle from throwing typed errors through logging, monitoring, and client-facing response formatting.

When to Use

  • Handling API errors consistently across endpoints
  • Debugging production issues with request tracing
  • Implementing error recovery strategies (retry, circuit breaker)
  • Monitoring and alerting on error rates
  • Providing meaningful, actionable error messages to clients
  • Validating request inputs before processing
  • Tracking error patterns over time

Quick Start

Minimal standardized error response format:

Sponsors

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Categories
Backend & APIs, DevOps & CI/CD, AI & Agent Building, Debugging
First seen
Jun 3, 2026

More from aj-geddes/useful-ai-prompts

All 258
1yoanbernabeu avatarsupabase-audit-tables-readyoanbernabeu/supabase-pentest-skillsAttempt to read data from exposed tables to verify actual data exposure and RLS effectiveness.511skills.sh installs
2manutej avatargrpc-microservicesmanutej/luxor-claude-marketplaceComprehensive gRPC microservices skill covering protobuf schemas, service definitions, streaming patterns, interceptors, load balancing, and production gRPC arc510skills.sh installs
3yoanbernabeu avatarsupabase-audit-buckets-publicyoanbernabeu/supabase-pentest-skillsIdentify storage buckets that are publicly accessible and may contain sensitive data.509skills.sh installs
4wvlvik avatarjimeng-api-image-genwvlvik/toy-skills(project - Skill) Generate AI images using Volcengine Jimeng API 4.0. Use when users request image generation from text prompts, image-to-image editing, or batc502skills.sh installs
5yoanbernabeu avatarsupabase-audit-buckets-readyoanbernabeu/supabase-pentest-skillsAttempt to list and read files from storage buckets to verify access controls.497skills.sh installs
6secondsky avatarapi-contract-testingsecondsky/claude-skillsVerifies API contracts between services using consumer-driven contracts, schema validation, and tools like Pact. Use when testing microservices communication, p491skills.sh installs