Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
backend ruleP2stack specificStack: node
apihttp-statusreadability
Do not set the default 200 status explicitly
When a successful JSON response uses the default 200 status, return the json directly rather than calling status(200) to reduce noise.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codetypescript
| 1 | return res.status(200).json(response); |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | return res.json(response); |
Explanation (EN)
Objašnjenje (HR)