# Detection of Error Condition Without Action (CWE-390) The product detects a specific error, but takes no actions to handle the error. - Prevalence: Moyenne 1 langages couverts - Impact: Moyen Revue recommandée - Prevention: Documentée 1 exemples de correctifs **OWASP:** Insecure Design (A04:2021-Insecure Design) - #4 ## Description Empty catch blocks or error handlers that don't actually handle the error can mask problems and lead to undefined behavior. The product may continue operating in an error state, leading to crashes or security vulnerabilities. ## Prevention Stratégies de prévention pour Detection of Error Condition Without Action basées sur 1 règles de détection Shoulder. ### JavaScript Log errors with context, respond to users, and propagate or handle appropriately ## Warning Signs - [MEDIUM] Catch block at line ... has incomplete error handling - [MEDIUM] empty catch blocks and incomplete error handling patterns that silently swallow errors ## Consequences - DoS - Exécuter du code non autorisé - Modification des données de l'application ## Mitigations - Gérez toujours les erreurs de manière appropriée, ne serait-ce qu'en les journalisant - Mettez en place une reprise d'erreur appropriée ou un comportement fail-safe - Utilisez des outils de linting pour détecter les gestionnaires d'exceptions vides ## Detection - Total rules: 1 - Languages: javascript, typescript ## Rules by Language ### Javascript (1 rules) - **Incomplete Error Handling** [MEDIUM]: Detects empty catch blocks and incomplete error handling patterns that silently swallow errors. - Remediation: Implement proper error handling with recovery, logging, and user feedback. ### Typescript (1 rules) - **Incomplete Error Handling** [MEDIUM]: Detects empty catch blocks and incomplete error handling patterns that silently swallow errors. - Remediation: Implement proper error handling with recovery, logging, and user feedback.