fix(error-handler): use HTTP 422 for validation errors
This commit is contained in:
@@ -17,7 +17,7 @@ const errorHandler = (error, request, response, next) => {
|
||||
}
|
||||
|
||||
if (error instanceof ValidationError) {
|
||||
renderObjectionError(response, error);
|
||||
renderObjectionError(response, error, 422);
|
||||
}
|
||||
|
||||
if (error instanceof DataError) {
|
||||
|
Reference in New Issue
Block a user