Why this matters
Hidden failures lead to data corruption and unpredictable state.
Never swallow exceptions in catch blocks; either rethrow or return an explicit error result.
Hidden failures lead to data corruption and unpredictable state.
Side-by-side examples engineers can pattern-match during review.
try { await doWork(); } catch (e) { /* ignore */ }try { await doWork(); } catch (e) { logger.error('doWork',{e}); throw e; }catch(e) { }catch(e) { logger.error(e); throw e }From the same buckets as this rule.
Check if loops use equality operators (== or !=) in termination conditions. These can lead to infinite loops if the condition is never met exactly. Instead, use relational operators like < or > for safer loop termination.