What problem does it solve?
The skill standardizes API error messaging and handling across the frontend so developers avoid duplicated error UI, incorrect try/catch patterns, and inconsistent user feedback while ensuring clear severity-based responses.
Core Features & Use Cases
- Global interception: maps HTTP and business codes to user-friendly messages and severity levels via the responded interceptor.
- Component callbacks: enforces the use of useRequest with immediate: false and onError/onSuccess callbacks for business recovery and state restoration.
- Error classification: defines fatal, severe, normal, and light levels with matched UI actions (modal, toast, warning, silent).
- Use cases: list queries, form submissions, paginated loads, silent requests that disable automatic toasts, and migration from legacy API patterns.
Quick Start
Apply the project's API error handling rules to this component's useRequest calls to ensure immediate:false, proper onError handling, and no try/catch wrapping of send().