Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[STORY] Refactor 400/422 errors, standardize across repos #22

Open
ValerianClerc opened this issue Jun 4, 2020 · 0 comments
Open

[STORY] Refactor 400/422 errors, standardize across repos #22

ValerianClerc opened this issue Jun 4, 2020 · 0 comments
Assignees
Labels
api microservice-related changes p3 technical debt

Comments

@ValerianClerc
Copy link
Member

Currently, 422 errors are thrown in validators, and 400 errors in controllers. However, we might want to factor out 400 errors to a separate middleware, or include it in the existing validators.

Furthermore, in the user's microservice we check for existence of a conflicting username in the controller, with a 400 error. However, in the problems microservice, we check for the existence of problems/problemsets in the validators, returning 422 responses. These are similar validation checks, but they occur in different parts of the code and return different responses. This should be standardized/refactored.

@MohamedBeydoun MohamedBeydoun changed the title Refactor 400/422 errors, standardize across repos [STORY] Refactor 400/422 errors, standardize across repos Jun 7, 2020
@MohamedBeydoun MohamedBeydoun added the api microservice-related changes label Jun 25, 2020
@ValerianClerc ValerianClerc added p3 and removed p1 labels Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api microservice-related changes p3 technical debt
Projects
None yet
Development

No branches or pull requests

3 participants