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, the status is set in the controller but after that Swagger tries to validate the response against the response schema. If the status was 2** it remains that way even if the validation fails and the response actually contains error messages.
Normally these response validation errors shouldn't happen in production but since the assumptions we made about the data are not always right, there are cases when it happens and it ruins the frontend flow.
We should respond with 500 and log the errors.
The text was updated successfully, but these errors were encountered:
georgiana-b
changed the title
Return error status if swagger response validation fails
Return error status if Swagger response validation fails
Jan 30, 2018
Currently, the status is set in the controller but after that Swagger tries to validate the response against the response schema. If the status was 2** it remains that way even if the validation fails and the response actually contains error messages.
Normally these response validation errors shouldn't happen in production but since the assumptions we made about the data are not always right, there are cases when it happens and it ruins the frontend flow.
We should respond with
500
and log the errors.The text was updated successfully, but these errors were encountered: