# Unchecked Return Value from Critical Operations - ID: javascript-unchecked-return-value - Severity: HIGH - CWE: Unchecked Return Value (CWE-252) - Languages: JavaScript, TypeScript - Frameworks: nodejs, express, fastify, nextjs ## Description Detects critical operations (file system, database, authentication) whose return values are not checked. Ignoring return values can lead to silent failures, data corruption, and security vulnerabilities. Critical operations that must have their return values checked include: - File system operations (write, delete, chmod) - Database operations (insert, update, delete) - Authentication/authorization checks - Cryptographic operations ## Detection Message Return value from {operation} at {location} is not checked ## Remediation Always check return values from critical operations: ```javascript // ✅ SAFE - Check return value const result = await fs.writeFile(path, data); if (!result.success) { logger.error('Write failed'); throw new Error('Failed to write file'); } ``` ## Documentation [object Object] ## Related Rules - **Unchecked Error Return Values** [MEDIUM]: