error-handling
यह क्या करती है
यह स्किल देखती है कि कोड errors को कैसे संभालता है, खासकर async कार्यों और React कॉम्पोनेंट्स में। यह उन डेवलपर्स के लिए है जो ऐसे ऐप चाहते हैं जो सुचारु रूप से विफल हों और डीबग करना आसान हो।
कब इस्तेमाल करें
- ✓जब कोई error आने के बाद आपका ऐप क्रैश हो या खाली हो जाए।
- ✓जब async अनुरोध बिना किसी संदेश या लॉग के विफल हों।
- ✓जब आप React ऐप बनाते हैं और चाहते हैं कि errors स्क्रीन के एक हिस्से तक सीमित रहें।
Skill का लिंक
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/error-handling/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप मेरे कोड की समीक्षा कर सकते हैं ताकि सुनिश्चित हो कि errors ठीक से संभाले जाते हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट ऐसे async कार्य खोजता है जिनमें try-catch ब्लॉक नहीं हैं, और ऐसे errors जिन्हें चुपचाप नज़रअंदाज़ किया जाता है। वह उन्हें पकड़ने, उपयोगी संदर्भ लॉग करने और React में error boundaries जोड़ने का सुझाव देता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Implement proper error handling
Unhandled errors crash applications, create poor user experiences, and make debugging impossible without proper context.
Quick Reference
- Wrap async operations in try-catch blocks
- Use Error Boundaries in React for UI-level error handling
- Log errors with context for debugging
- Always re-throw or handle—never silently swallow errors
Check
Review error handling in this code, ensuring async operations use try-catch and errors are properly logged.
Fix
Add try-catch blocks to async operations and implement error boundaries for React components.
Explain
Explain JavaScript error handling best practices including try-catch, Promise rejection, and error boundaries.
Code Review
Review scripts, client components, and browser execution paths related to Implement proper error handling. Flag exact imports, event handlers, runtime side effects, or blocking operations that violate the rule, and state how the change should be verified in the browser.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/javascript/error-handling
अक्सर पूछे जाने वाले सवाल
error boundary क्या है?
React में यह एक कॉम्पोनेंट है जो उसके children के errors पकड़ता है और पूरी स्क्रीन क्रैश करने के बजाय fallback दिखाता है।
क्या किसी error को नज़रअंदाज़ करना ठीक है?
स्किल कहती है कि errors को कभी चुपचाप न निगलें। हर error को संभाला या आगे भेजा जाना चाहिए।
क्या यह promise rejections जाँचती है?
हाँ। स्किल संभाले न गए promise rejections को अच्छे error handling का हिस्सा मानती है।
जानकारी
लेखक का मूल विवरण
Use when reviewing scripts, client components, bundles, or runtime behavior related to Implement proper error handling. Inspect both source code and the browser execution path so fixes target the real bottleneck or bug.
लोकप्रियता
- GitHub स्टार
- 75k
- रैंकिंग में स्थान
- #2833
- लाइसेंस
- MIT
- अपडेट की गई
- 31/10/2026
कमेंट
- …
इस repository की और skills
frontendchecklist
75kकमांड-लाइन टूल से फ़्रंटएंड कोड और लाइव पेजों को एक्सेसिबिलिटी, स्पीड, SEO और सिक्योरिटी के 380 से ज़्यादा नियमों से जाँचती है।
frontend-checklist-global
75kफ़्रंटएंड प्रोजेक्ट को Front-End Checklist के सभी 386 नियमों से ऑडिट करती है, और हर मिली समस्या का ठोस समाधान देती है।
404-page
75kजाँचती है कि आपका गुम पेज उपयोगी लिंक देता है और सही 404 स्टेटस लौटाता है, ताकि भटके हुए विज़िटर रास्ता ढूँढ सकें।
about-page
75kजाँचती है कि आपकी साइट पर एक साफ़ About पेज है जो बताता है कि उसे कौन चलाता है, ताकि विज़िटर और सर्च इंजन का भरोसा बढ़े।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।