error-handling

Enforce centralized error handling across service, application, and UI layers.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/alejandro-technology/react-native-template --skill error-handling-alejandro-technology
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling
Source: https://github.com/alejandro-technology/react-native-template/tree/main/.claude/skills/enforcement/error-handling
Command: npx skills add https://github.com/alejandro-technology/react-native-template --skill error-handling-alejandro-technology

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Centralizes and enforces a consistent error handling strategy across service, application, and UI layers to ensure uniform error types, messages, and user experience.

Core Features & Use Cases

  • Define and enforce standardized error types and localized messages (Spanish) across layers
  • Return errors from the service layer (no throws) and propagate them through the application with predictable UI states
  • Provide UI patterns for loading, error, and empty states with guarded rendering and retry options

Quick Start

Audit your codebase to adopt the centralized error handling patterns described here and implement the service, application, and UI error flows.

Frequently Asked Questions about error-handling

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

FAQPage Schema
How do I enforce centralized error handling across service and UI layers in TypeScript?

Centralized error handling enforces consistent error types and messages by returning errors from the service layer without throwing, propagating them through the application layer, and rendering predictable UI states with retry options.

What is the best way to handle Axios and Firebase errors without throwing them in service methods?

The best way to handle Axios and Firebase errors is to parse them in the service layer and return standardized error types instead of throwing, allowing the application layer to propagate them and the UI to render consistent error states.

How do I render predictable UI loading, error, and empty states with guarded TypeScript rendering?

To render predictable UI loading, error, and empty states, use guarded rendering patterns driven by centralized error types, ensuring the UI displays appropriate state messages and retry options without crashing.

Does this centralized error handling approach support Spanish localized error messages?

Yes, the centralized error handling approach supports Spanish localization by defining standardized error types and mapping them to Spanish messages for consistent rendering across service, application, and UI layers.

Why should my service layer return errors instead of throwing them?

Your service layer should return errors instead of throwing them to ensure predictable error propagation through the application layer, which prevents uncaught exceptions and allows the UI to render consistent error states.

Can I use this error handling pattern for both frontend and backend TypeScript applications?

Yes, you can use this centralized error handling pattern for both frontend and backend TypeScript applications because it enforces consistent error types and propagation across service, application, and UI layers.