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

switch Method and StatusCode to http-types #860

Merged
merged 12 commits into from
Jun 28, 2022
Merged

Conversation

ctaggart
Copy link
Contributor

@ctaggart ctaggart commented Jun 27, 2022

http-types has better representations of both Method and StatusCode as I described in more detail earlier.

I reverted the generated services code to make it easier to review.

@cataggar cataggar marked this pull request as ready for review June 27, 2022 22:51
@cataggar cataggar requested review from yoshuawuyts and rylev June 27, 2022 23:32
@cataggar cataggar requested a review from bmc-msft June 28, 2022 13:46
@@ -26,7 +26,7 @@ impl HttpError {
let body = response.into_body().await;
error_code = error_code.or_else(|| get_error_code_from_body(&body));
HttpError {
status: status.as_u16(),
status: status as u16,
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we are re-exporting StatusCode now, can we make the error include the enum value instead of a u16? This will make dealing with contextualized errors significantly more straightforward.

Copy link
Member

Choose a reason for hiding this comment

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

I think that is a good idea in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added #870

Copy link
Contributor

@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.

LGTM

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.

4 participants