Open Issues Need Help
View All on GitHubAI Summary: This issue proposes refactoring all controllers in the backend to delegate error handling to a centralized `errorHandler.js` middleware. The goal is to remove repetitive error response logic from controllers, making them cleaner and standardizing API error responses. This involves adding the `next` parameter to controller functions and using `next(error)` for error propagation.
AI Summary: This issue proposes implementing data validation within controllers to prevent SQL errors and data corruption. The goal is to add checks for DNI format, numeric IDs, date consistency, and missing required fields before data is processed by services. This enhancement aims to improve data integrity and robustness.
AI Summary: This issue aims to enhance server robustness by implementing manual data validations in controllers, specifically checking DNI length and date coherence. It also proposes creating a centralized error handling middleware to manage try/catch blocks and specifically handle PostgreSQL duplicate entry errors by returning a 409 status code.