Return a generic, safe message to clients while logging full details server-side. Leaking stack traces, SQL, or file paths aids attackers and confuses users.
Why This Matters
Exposed stack traces and raw error messages leak implementation details, file paths, and query structure that attackers use for reconnaissance.
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.