error-handling-fundamentals
Master Error Handling Best Practices
Poor error handling leads to silent failures and user frustration. This skill teaches you to write resilient code that gracefully handles failures and provides clear feedback to users.
تنزيل ZIP المهارة
رفع في Claude
اذهب إلى Settings → Capabilities → Skills → Upload skill
فعّل وابدأ الاستخدام
اختبرها
استخدام "error-handling-fundamentals". Review this error handling code: try { await fetchUser(); } catch (error) { console.log(error); }
النتيجة المتوقعة:
- Empty catch block detected - errors are logged but not handled
- Good: Error is caught to prevent crash
- Missing: User feedback - what should the user see
- Missing: Error context - no request ID or user info
- Missing: Retry logic for network failures
- Suggestion: Add user-friendly message and retry button
استخدام "error-handling-fundamentals". Check this API error response handler
النتيجة المتوقعة:
- Good: Status code is checked for errors
- Missing: Specific error messages for different failure types
- Consider: Adding retry with exponential backoff for 5xx errors
- Tip: Log errors server-side without exposing details to client
استخدام "error-handling-fundamentals". Review this form validation with error messages
النتيجة المتوقعة:
- Good: Each field is validated separately with specific messages
- Consider: Grouping errors for better UX
- Missing: Accessibility attributes for screen readers
- Tip: Show errors inline next to each field
التدقيق الأمني
آمنThis is a documentation-only skill containing error handling guidelines and best practices. All 39 static findings are FALSE POSITIVES. SKILL.md is markdown documentation with code examples - the backticks flagged are markdown syntax, not shell execution. skill-report.json is pure metadata. No executable code, network calls, file system access, or external commands exist in this skill.
عوامل الخطر
🌐 الوصول إلى الشبكة (2)
📁 الوصول إلى نظام الملفات (2)
⚙️ الأوامر الخارجية (19)
درجة الجودة
ماذا يمكنك بناءه
Learn Error Handling Patterns
Understand proper try/catch usage, error boundaries, and recovery strategies through guided code reviews.
Standardize Error Practices
Ensure consistent error handling across your team codebase with automated review checklists.
Handle API Failures Gracefully
Review frontend and backend error handling to prevent crashes and improve user experience.
جرّب هذه الموجهات
Review this error handling code and check if it follows best practices for user experience and debugging.
Analyze this API error handling code for proper status code checks, retry logic, and user feedback.
Check this async code for proper error propagation, catch blocks, and error context preservation.
Evaluate this error boundary implementation for proper error catching, logging, and fallback UI rendering.
أفضل الممارسات
- Always provide meaningful error messages that users can understand without technical jargon
- Include error context for debugging while hiding sensitive details from users
- Use finally blocks for cleanup operations like resetting loading states
تجنب
- Empty catch blocks that silently swallow errors without any handling
- Exposing stack traces or technical error details to end users
- Catching errors too early and returning null without context for callers
الأسئلة المتكررة
Which programming languages does this skill support?
Will this skill fix my errors automatically?
Can I use this for production code reviews?
How does this handle async/await versus Promise chains?
What if my error handling is framework-specific?
Does this cover logging and monitoring?
تفاصيل المطور
المؤلف
DanielPodolskyالترخيص
MIT
المستودع
https://github.com/DanielPodolsky/mentor-spec/tree/main/.claude/skills/fundamentals/error-handlingمرجع
main
بنية الملفات
📄 SKILL.md