Description:
Different endpoints return validation errors in different formats, making it difficult for frontend applications to handle errors consistently.
Current Issues:
- Inconsistent error message formats
- Some endpoints return HTML errors instead of JSON
- Missing field-level validation details
- Error codes are not standardized
- No client-friendly error messages
What needs to be fixed:
- Standardize error response format
- Ensure all endpoints return JSON errors
- Add field-level validation details
- Implement consistent error codes
- Add user-friendly error messages
Acceptance Criteria:
Files to modify:
- All controller files
src/middleware/errorMiddleware.js
Description:
Different endpoints return validation errors in different formats, making it difficult for frontend applications to handle errors consistently.
Current Issues:
What needs to be fixed:
Acceptance Criteria:
Files to modify:
src/middleware/errorMiddleware.js