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

Return error status if Swagger response validation fails #58

Open
georgiana-b opened this issue Jan 30, 2018 · 0 comments
Open

Return error status if Swagger response validation fails #58

georgiana-b opened this issue Jan 30, 2018 · 0 comments
Assignees

Comments

@georgiana-b
Copy link
Member

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.

@georgiana-b georgiana-b changed the title Return error status if swagger response validation fails Return error status if Swagger response validation fails Jan 30, 2018
@georgiana-b georgiana-b self-assigned this Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant