Inspect the caught error, handle only the cases you understand, and rethrow the rest. A blanket catch that absorbs every error masks unrelated bugs.
Why This Matters
Over-broad catch blocks intercept unexpected errors they were never meant to handle, hiding real defects.
Related Rules
Catch this automatically on every PR
BeforeMerge scans your pull requests against this rule and dozens more. Get actionable feedback before code ships.