Snippet · Writing & changing code
Fix the error handling
Find every place a failure disappears.
Audit the error handling in this: <paste> Find: - Empty catch blocks, and catches that only log then continue as if nothing happened. - Errors caught too broadly, hiding ones I'd want to know about. - Promises with no rejection handling. - Failures that leave things half-done — a record created but not linked, a file written but not registered. - Errors shown to users with internal detail in them. For each: what actually happens today, what should happen, and whether this failure should be retried, reported, or shown to the user.
A catch that logs and continues is a decision to proceed with broken state. Sometimes right, usually accidental, and worth making deliberately.