You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
MohamedBeydoun
changed the title
Refactor 400/422 errors, standardize across repos
[STORY] Refactor 400/422 errors, standardize across repos
Jun 7, 2020
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.
The text was updated successfully, but these errors were encountered: