error-handling

Implement error handling and structured logging for ArabyBuddy services.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/AhmedAGadir/arabybuddy --skill error-handling-ahmedagadir
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling
Source: https://github.com/AhmedAGadir/arabybuddy/tree/main/.claude/skills/error-handling
Command: npx skills add https://github.com/AhmedAGadir/arabybuddy --skill error-handling-ahmedagadir

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a standardized and robust approach to managing errors and logging information across ArabyBuddy services and components, ensuring better stability and easier debugging.

Core Features & Use Cases

  • Structured Logging: Utilizes a dedicated logger for consistent, context-aware logging across the application.
  • Error Handling Patterns: Implements error boundaries, service-layer API error management, custom error classes, and user-friendly feedback mechanisms (toasts, alerts).
  • Use Case: When a payment fails, instead of showing a cryptic error, this Skill ensures a user-friendly toast message is displayed, while detailed error information is logged for developers to diagnose.

Quick Start

Use the error-handling skill to log a payment failure with the order ID and error details.

Frequently Asked Questions about error-handling

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

FAQPage Schema
How do I handle API errors at the service layer without exposing cryptic messages to users?

Handling API errors at the service layer involves managing exceptions centrally and translating them into user-friendly feedback like toasts. This approach ensures user-facing feedback is distinct from developer-facing detailed diagnostic logs.

What is structured logging and how does it improve debugging?

Structured logging uses a dedicated, context-aware logger to record consistent diagnostic information across application components. This provides detailed, scoped context for developers to diagnose issues efficiently.

How do I implement error boundaries for UI resilience in my application?

Implementing error boundaries for UI resilience involves wrapping components to catch rendering errors gracefully. This prevents the entire application from crashing when a specific component fails.

Can I separate user-facing alerts from developer-facing diagnostic logs?

Yes, you can separate user-facing alerts from developer-facing logs by using custom error classes and a scoped logger. This ensures users see friendly toasts while developers receive detailed error information.

What's the best way to log a failed payment transaction with error details?

The best way to log a failed payment transaction is using a scoped logger to record the order ID and specific error details. This captures context-aware diagnostics for the service layer while displaying a user-friendly toast.