[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EQKSVB60QW43PR5YQM33YF":3,"skill-same:01M6EQKSVB60QW43PR5YQM33YF":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":43,"ownerHtmlUrl":44,"ownerBlogUrl":6,"ownerDescription":45,"updatedAt":46,"install":47,"resources":60},"01M6EQKSVB60QW43PR5YQM33YF","error-handling-fundamentals",null,"Auto-invoke when reviewing try\u002Fcatch blocks, API error responses, async operations, or user feedback patterns. Enforces graceful degradation and meaningful error messages.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdanielpodolsky\u002Ferror-handling-fundamentals\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32],"error handling","error","error handling fundamentals","error messages","messages","api","feedback","user","operations","auto","async","patterns","degradation","blocks","2026-11-10 10:12:30",false,"---\nname: error-handling-fundamentals\ndescription: Auto-invoke when reviewing try\u002Fcatch blocks, API error responses, async operations, or user feedback patterns. Enforces graceful degradation and meaningful error messages.\n---\n\n# Error Handling Fundamentals Review\n\n> \"Errors are not failures — they're information. Handle them like the valuable data they are.\"\n\n## When to Apply\n\nActivate this skill when reviewing:\n- try\u002Fcatch blocks\n- Promise chains (.then\u002F.catch)\n- API error responses\n- Form validation\n- Network request handling\n- User-facing error messages\n\n---\n\n## Review Checklist\n\n### Error Catching\n\n- [ ] **No empty catches**: Is every catch block doing something meaningful?\n- [ ] **Proper scope**: Are errors caught at the right level?\n- [ ] **Context added**: Do errors include helpful debugging info?\n- [ ] **Finally used**: Are cleanup operations in finally blocks?\n\n### User Experience\n\n- [ ] **User-friendly messages**: Will users understand the error?\n- [ ] **No technical details exposed**: Are stack traces hidden from users?\n- [ ] **Actionable feedback**: Does the error tell users what to do next?\n- [ ] **Graceful degradation**: Does the app still work partially on error?\n\n### Logging & Debugging\n\n- [ ] **Errors logged**: Are errors recorded for debugging?\n- [ ] **Context in logs**: Do logs include request ID, user ID, etc.?\n- [ ] **Severity levels**: Are critical errors distinguished from warnings?\n\n### Recovery\n\n- [ ] **Retry logic**: Should this operation retry on failure?\n- [ ] **Fallback values**: Is there a sensible default on error?\n- [ ] **Loading states**: Is the user informed while retrying?\n\n---\n\n## Common Mistakes (Anti-Patterns)\n\n### 1. The Empty Catch (The Silent Killer)\n```\n❌ try {\n     await submitForm();\n   } catch (error) {\n     \u002F\u002F TODO: handle later (never happens)\n   }\n\n✅ try {\n     await submitForm();\n   } catch (error) {\n     console.error('Form submission failed:', error);\n     setError('Could not submit. Please try again.');\n   }\n```\n\n### 2. Catching Too Early\n```\n❌ function getUser(id) {\n     try {\n       return database.query(id);\n     } catch {\n       return null; \u002F\u002F Caller has no idea it failed\n     }\n   }\n\n✅ function getUser(id) {\n     return database.query(id); \u002F\u002F Let caller decide\n   }\n\n   \u002F\u002F In UI layer\n   try {\n     const user = await getUser(id);\n   } catch (error) {\n     showToast('Could not load user');\n   }\n```\n\n### 3. Generic Error Messages\n```\n❌ catch (error) {\n     setError('An error occurred');\n   }\n\n✅ catch (error) {\n     if (error.code === 'NETWORK_ERROR') {\n       setError('Check your internet connection');\n     } else if (error.code === 'NOT_FOUND') {\n       setError('User not found');\n     } else {\n       setError('Something went wrong. Please try again.');\n     }\n   }\n```\n\n### 4. Leaking Stack Traces\n```\n❌ res.status(500).json({\n     error: error.message,\n     stack: error.stack\n   });\n\n✅ logger.error('Request failed', { error, requestId });\n   res.status(500).json({\n     error: 'Something went wrong'\n   });\n```\n\n### 5. Forgetting Finally\n```\n❌ try {\n     setLoading(true);\n     await fetchData();\n     setLoading(false);\n   } catch (error) {\n     handleError(error);\n     \u002F\u002F Loading stays true forever!\n   }\n\n✅ try {\n     setLoading(true);\n     await fetchData();\n   } catch (error) {\n     handleError(error);\n   } finally {\n     setLoading(false); \u002F\u002F Always runs\n   }\n```\n\n---\n\n## Socratic Questions\n\nAsk the junior these questions instead of giving answers:\n\n1. **Empty Catch**: \"What happens if this fails silently?\"\n2. **User Message**: \"If you were the user, would this message help you?\"\n3. **Recovery**: \"Should we retry this automatically?\"\n4. **Scope**: \"Is this the right place to catch this error?\"\n5. **Logging**: \"How will you debug this in production?\"\n\n---\n\n## Error Message Guidelines\n\n### Do\n- Be specific: \"The email address is already registered\"\n- Be helpful: \"Please check your internet connection\"\n- Offer next steps: \"Try again\" or \"Contact support\"\n- Match severity: Critical errors need more attention than warnings\n\n### Don't\n- Show technical details: `TypeError: Cannot read property 'map' of undefined`\n- Be vague: \"An error occurred\"\n- Blame the user: \"You entered invalid data\"\n- Use jargon: \"HTTP 500 Internal Server Error\"\n\n---\n\n## Error Handling Patterns\n\n### API\u002FNetwork Errors\n```typescript\nasync function fetchWithRetry(url: string, retries = 3): Promise\u003CResponse> {\n  try {\n    const response = await fetch(url);\n    if (!response.ok) {\n      throw new Error(`HTTP ${response.status}`);\n    }\n    return response;\n  } catch (error) {\n    if (retries > 0) {\n      await sleep(1000);\n      return fetchWithRetry(url, retries - 1);\n    }\n    throw error;\n  }\n}\n```\n\n### Form Validation\n```typescript\nfunction validateForm(data: FormData) {\n  const errors: Record\u003Cstring, string> = {};\n\n  if (!data.email) {\n    errors.email = 'Email is required';\n  } else if (!isValidEmail(data.email)) {\n    errors.email = 'Please enter a valid email';\n  }\n\n  return {\n    isValid: Object.keys(errors).length === 0,\n    errors\n  };\n}\n```\n\n### React Error Boundaries\n```typescript\nclass ErrorBoundary extends React.Component {\n  state = { hasError: false };\n\n  static getDerivedStateFromError(error) {\n    return { hasError: true };\n  }\n\n  componentDidCatch(error, info) {\n    logError(error, info);\n  }\n\n  render() {\n    if (this.state.hasError) {\n      return \u003CFallbackUI \u002F>;\n    }\n    return this.props.children;\n  }\n}\n```\n\n---\n\n## Standards Reference\n\nSee detailed patterns in:\n- `\u002Fstandards\u002Fglobal\u002Ferror-handling.md`\n\n---\n\n## Red Flags to Call Out\n\n| Flag | Question to Ask |\n|------|-----------------|\n| Empty catch block | \"What happens when this fails?\" |\n| `catch (e) { return null }` | \"How will the caller know it failed?\" |\n| No loading state | \"What does the user see while waiting?\" |\n| Technical error shown | \"Will the user understand this message?\" |\n| No finally for cleanup | \"Is loading state stuck on error?\" |\n| console.log instead of error | \"How will you find this in production logs?\" |\n","# Error Handling Fundamentals Review\n\n> \"Errors are not failures — they're information. Handle them like the valuable data they are.\"\n\n## When to Apply\n\nActivate this skill when reviewing:\n- try\u002Fcatch blocks\n- Promise chains (.then\u002F.catch)\n- API error responses\n- Form validation\n- Network request handling\n- User-facing error messages\n\n---\n\n## Review Checklist\n\n### Error Catching\n\n- [ ] **No empty catches**: Is every catch block doing something meaningful?\n- [ ] **Proper scope**: Are errors caught at the right level?\n- [ ] **Context added**: Do errors include helpful debugging info?\n- [ ] **Finally used**: Are cleanup operations in finally blocks?\n\n### User Experience\n\n- [ ] **User-friendly messages**: Will users understand the error?\n- [ ] **No technical details exposed**: Are stack traces hidden from users?\n- [ ] **Actionable feedback**: Does the error tell users what to do next?\n- [ ] **Graceful degradation**: Does the app still work partially on error?\n\n### Logging & Debugging\n\n- [ ] **Errors logged**: Are errors recorded for debugging?\n- [ ] **Context in logs**: Do logs include request ID, user ID, etc.?\n- [ ] **Severity levels**: Are critical errors distinguished from warnings?\n\n### Recovery\n\n- [ ] **Retry logic**: Should this operation retry on failure?\n- [ ] **Fallback values**: Is there a sensible default on error?\n- [ ] **Loading states**: Is the user informed while retrying?\n\n---\n\n## Common Mistakes (Anti-Patterns)\n\n### 1. The Empty Catch (The Silent Killer)\n```\n❌ try {\n     await submitForm();\n   } catch (error) {\n     \u002F\u002F TODO: handle later (never happens)\n   }\n\n✅ try {\n     await submitForm();\n   } catch (error) {\n     console.error('Form submission failed:', error);\n     setError('Could not submit. Please try again.');\n   }\n```\n\n### 2. Catching Too Early\n```\n❌ function getUser(id) {\n     try {\n       return database.query(id);\n     } catch {\n       return null; \u002F\u002F Caller has no idea it failed\n     }\n   }\n\n✅ function getUser(id) {\n     return database.query(id); \u002F\u002F Let caller decide\n   }\n\n   \u002F\u002F In UI layer\n   try {\n     const user = await getUser(id);\n   } catch (error) {\n     showToast('Could not load user');\n   }\n```\n\n### 3. Generic Error Messages\n```\n❌ catch (error) {\n     setError('An error occurred');\n   }\n\n✅ catch (error) {\n     if (error.code === 'NETWORK_ERROR') {\n       setError('Check your internet connection');\n     } else if (error.code === 'NOT_FOUND') {\n       setError('User not found');\n     } else {\n       setError('Something went wrong. Please try again.');\n     }\n   }\n```\n\n### 4. Leaking Stack Traces\n```\n❌ res.status(500).json({\n     error: error.message,\n     stack: error.stack\n   });\n\n✅ logger.error('Request failed', { error, requestId });\n   res.status(500).json({\n     error: 'Something went wrong'\n   });\n```\n\n### 5. Forgetting Finally\n```\n❌ try {\n     setLoading(true);\n     await fetchData();\n     setLoading(false);\n   } catch (error) {\n     handleError(error);\n     \u002F\u002F Loading stays true forever!\n   }\n\n✅ try {\n     setLoading(true);\n     await fetchData();\n   } catch (error) {\n     handleError(error);\n   } finally {\n     setLoading(false); \u002F\u002F Always runs\n   }\n```\n\n---\n\n## Socratic Questions\n\nAsk the junior these questions instead of giving answers:\n\n1. **Empty Catch**: \"What happens if this fails silently?\"\n2. **User Message**: \"If you were the user, would this message help you?\"\n3. **Recovery**: \"Should we retry this automatically?\"\n4. **Scope**: \"Is this the right place to catch this error?\"\n5. **Logging**: \"How will you debug this in production?\"\n\n---\n\n## Error Message Guidelines\n\n### Do\n- Be specific: \"The email address is already registered\"\n- Be helpful: \"Please check your internet connection\"\n- Offer next steps: \"Try again\" or \"Contact support\"\n- Match severity: Critical errors need more attention than warnings\n\n### Don't\n- Show technical details: `TypeError: Cannot read property 'map' of undefined`\n- Be vague: \"An error occurred\"\n- Blame the user: \"You entered invalid data\"\n- Use jargon: \"HTTP 500 Internal Server Error\"\n\n---\n\n## Error Handling Patterns\n\n### API\u002FNetwork Errors\n```typescript\nasync function fetchWithRetry(url: string, retries = 3): Promise\u003CResponse> {\n  try {\n    const response = await fetch(url);\n    if (!response.ok) {\n      throw new Error(`HTTP ${response.status}`);\n    }\n    return response;\n  } catch (error) {\n    if (retries > 0) {\n      await sleep(1000);\n      return fetchWithRetry(url, retries - 1);\n    }\n    throw error;\n  }\n}\n```\n\n### Form Validation\n```typescript\nfunction validateForm(data: FormData) {\n  const errors: Record\u003Cstring, string> = {};\n\n  if (!data.email) {\n    errors.email = 'Email is required';\n  } else if (!isValidEmail(data.email)) {\n    errors.email = 'Please enter a valid email';\n  }\n\n  return {\n    isValid: Object.keys(errors).length === 0,\n    errors\n  };\n}\n```\n\n### React Error Boundaries\n```typescript\nclass ErrorBoundary extends React.Component {\n  state = { hasError: false };\n\n  static getDerivedStateFromError(error) {\n    return { hasError: true };\n  }\n\n  componentDidCatch(error, info) {\n    logError(error, info);\n  }\n\n  render() {\n    if (this.state.hasError) {\n      return \u003CFallbackUI \u002F>;\n    }\n    return this.props.children;\n  }\n}\n```\n\n---\n\n## Standards Reference\n\nSee detailed patterns in:\n- `\u002Fstandards\u002Fglobal\u002Ferror-handling.md`\n\n---\n\n## Red Flags to Call Out\n\n| Flag | Question to Ask |\n|------|-----------------|\n| Empty catch block | \"What happens when this fails?\" |\n| `catch (e) { return null }` | \"How will the caller know it failed?\" |\n| No loading state | \"What does the user see while waiting?\" |\n| Technical error shown | \"Will the user understand this message?\" |\n| No finally for cleanup | \"Is loading state stuck on error?\" |\n| console.log instead of error | \"How will you find this in production logs?\" |\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fdanielpodolsky\u002Ferror-handling-fundamentals",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill error-handling-fundamentals",{"tool":53,"command":54},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill error-handling-fundamentals",{"tool":56,"command":57},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill error-handling-fundamentals","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdanielpodolsky\u002Ferror-handling-fundamentals\u002FSKILL.md",true,[61],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"skill-report.json","REFERENCE","参考文档",11216,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fdanielpodolsky\u002Ferror-handling-fundamentals\u002Fskill-report.json",[68,77,86,95,101,107],{"skillNo":69,"name":70,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":33},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[74,75,76],"model","model hierarchy","model hierarchy skill",{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":33},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[83,84,85],"MCP","zoom","zoom mcp",{"skillNo":87,"name":88,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":33},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[92,93,94,84],"sdk","zoom apps sdk","apps",{"skillNo":96,"name":97,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":33},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[97],{"skillNo":102,"name":103,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":33},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[103],{"skillNo":108,"name":109,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":33},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[109]]