Description
Implement consistent error handling for API validation, DBMS errors, process failures, and unexpected backend failures.
Tasks
- Add centralized Express error middleware
- Define backend error response format
- Map invalid requests to client errors
- Map missing resources to not-found errors
- Map DBMS query errors
- Map DBMS process failures
- Hide internal stack traces from API responses
- Log unexpected backend errors
Acceptance Criteria
- API errors use a consistent JSON structure.
- DBMS errors are readable by the frontend.
- Internal implementation details are not exposed.
- Unexpected errors do not terminate the server.
Depends On
- feat: Initialize Node.js backend server
Description
Implement consistent error handling for API validation, DBMS errors, process failures, and unexpected backend failures.
Tasks
Acceptance Criteria
Depends On