Why
The backend already has structured middleware and request IDs, but response bodies can still vary by route. A standardized error shape would make integrations and client handling more predictable.
Acceptance criteria
- Define one canonical error response format.
- Apply it consistently across auth, admin, analytics, and public routes.
- Document the format and include examples for 400, 401, 403, 404, and 500 responses.
Why
The backend already has structured middleware and request IDs, but response bodies can still vary by route. A standardized error shape would make integrations and client handling more predictable.
Acceptance criteria