| name | reviewing-silent-failures |
| description | Silent failure detection patterns for frontend code. Triggers: サイレント障害, silent failure, 空のcatch, empty catch, 未処理Promise, unhandled rejection, unhandled promise, Error Boundary, fire and forget, エラーハンドリング, error handling, try-catch.
|
| allowed-tools | Read, Grep, Glob, Task |
Silent Failure Review - Error Visibility & Handling
Target: All failures are visible, debuggable, and user-informed.
Silent Failure Risk Levels
| Pattern |
Risk |
Impact |
| Empty catch block |
[Critical] |
Errors completely hidden |
| Promise without catch |
[Critical] |
Unhandled rejections |
| Fire and forget async |
[High] |
Lost error context |
| Console.log only |
[High] |
No user feedback |
| Missing Error Boundary |
[High] |
App crash on component error |
| Excessive optional chaining |
[Medium] |
May mask bugs |
Section-Based Loading
| Section |
File |
Focus |
Triggers |
| Detection |
references/detection-patterns.md |
Regex patterns, search commands |
空のcatch, empty catch |
| Handling |
references/error-handling.md |
Proper error handling patterns |
エラーハンドリング |
| Boundaries |
references/error-boundaries.md |
React Error Boundary |
Error Boundary |
Quick Checklist
Critical (Must Fix)
High Priority
Best Practices
Key Principles
| Principle |
Application |
| Fail Fast |
Make failures visible and immediate |
| User Feedback |
Always inform users of failures |
| Context Logging |
Log with enough info to debug |
| Graceful Degradation |
Fail gracefully, not silently |
Detection Commands
# Empty catch blocks
rg "catch\s*\([^)]*\)\s*\{\s*\}" --glob "*.{ts,tsx}"
# Then without catch
rg "\.then\([^)]+\)$" --glob "*.{ts,tsx}"
# Console.log only error handling
rg "catch.*console\.log" --glob "*.{ts,tsx}"
Common Patterns
Empty Catch → Proper Handling
// Bad: Silent failure
try {
await fetchUserData()
} catch (e) {
// Nothing here - error disappears
}
// Good: Proper handling
try {
await fetchUserData()
} catch (error) {
logger.error('Failed to fetch user data', { error })
setError('Unable to load user data. Please try again.')
}
Promise Chain → Error Handling
// Bad: Unhandled rejection
fetchData().then(data => setData(data))
// Good: With error handling
fetchData()
.then(data => setData(data))
.catch(error => {
logger.error('Failed to fetch data', error)
setError('Loading failed')
})
References
Core Principles
Related Skills
reviewing-type-safety - Type safety catches some errors at compile time
generating-tdd-tests - Test error paths
Used by Agents
silent-failure-reviewer - Primary consumer of this skill