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

fix: 500 only for output validation errors #892

Merged
merged 3 commits into from
Dec 13, 2019
Merged

Conversation

XVincentX
Copy link
Contributor

@XVincentX XVincentX commented Dec 13, 2019

It turns out that we were returning a 500 even if there were just Input violations in the current request — but in that case the negotiation process is already giving us the response we want to return; the 500 transformation is only required for output violations.

Please approve but do not merge, so I can bundle this in a patch release.

@XVincentX XVincentX marked this pull request as ready for review December 13, 2019 09:41
@XVincentX XVincentX force-pushed the fix/500-only-output branch 4 times, most recently from 115c1e1 to 0cd2094 Compare December 13, 2019 09:58
@XVincentX XVincentX force-pushed the fix/500-only-output branch 2 times, most recently from 731c912 to 982afe1 Compare December 13, 2019 10:19
Copy link
Contributor

@karol-maciaszek karol-maciaszek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job @XVincentX 👍

packages/http-server/src/server.ts Show resolved Hide resolved
@XVincentX XVincentX force-pushed the fix/500-only-output branch 3 times, most recently from 85a3096 to 0996a9d Compare December 13, 2019 10:38
@XVincentX XVincentX merged commit 6b591b9 into master Dec 13, 2019
@XVincentX XVincentX deleted the fix/500-only-output branch December 13, 2019 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants