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

Add 422 UnprocessableEntity to StatusCode. #112

Merged
merged 1 commit into from
Apr 23, 2020

Conversation

obmarg
Copy link
Contributor

@obmarg obmarg commented Apr 23, 2020

I'm using the surf alpha to talk to an API that returns a 422 when it
receives a payload of valid JSON that doesn't match it's expected
schema.

http-types doesn't know about this status code so surf panics. This
adds the 422 status code to http-types to work around this. Would be
good if surf didn't panic when receving an unknown status code, though
suppose that's a separate issue.

I'm using the surf alpha to talk to an API that returns a 422 when it
receives a payload of valid JSON that doesn't match it's expected
schema.

http-types doesn't know about this status code so surf panics.  This
adds the 422 status code to http-types to work around this.  Would be
good if surf didn't panic when receving an unknown status code, though
suppose that's a separate issue.
Copy link
Member

@yoshuawuyts yoshuawuyts left a comment

Choose a reason for hiding this comment

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

Thanks for this; looks like we missed that the first time around!

@yoshuawuyts yoshuawuyts merged commit 63fa43d into http-rs:master Apr 23, 2020
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.

2 participants