-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Currently, the API endpoints handle errors and responses individually, which can lead to inconsistent error handling and response formats. We need to implement a structured middleware system to standardize our API responses.
Proposed Changes:
-
Create a centralized response handler middleware that includes:
- Standardized success/error response format
- HTTP status code mapping
- Error code catalog
- Request validation middleware
-
Implement structured error types
-
Create response formatter
Expected Outcome:
- Consistent error handling across all endpoints
- Detailed error tracking and logging
- Improved debugging capabilities
- Better client-side error handling
Acceptance Criteria:
- Implement central error handling middleware
- Create error code catalog
- Add request validation middleware
- Update all endpoints to use new system
- Add comprehensive error logging
- Document error codes and responses
Note: This issue is to be merged on main branch so make sure to edit test cases to follow changes. Try to take a modular approach and use akavesdk to verify error codes each command can throw.
Winter-Soren
Metadata
Metadata
Assignees
Labels
No labels