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 error message about content-types #775

Merged
merged 1 commit into from
Sep 13, 2024
Merged

Fix error message about content-types #775

merged 1 commit into from
Sep 13, 2024

Conversation

jhump
Copy link
Member

@jhump jhump commented Sep 13, 2024

The error message had a copy+pasta bug where it was showing the wrong prefix. This resulted in possibly very confusing error message where it complained that the content-type was wrong, but then said it was expecting exactly what it actually got.

Signed-off-by: Josh Humphries <2035234+jhump@users.noreply.github.com>
Comment on lines +171 to +172
// We never setup a request body, so it's effectively already closed.
// So nothing else to do.
Copy link
Member Author

@jhump jhump Sep 13, 2024

Choose a reason for hiding this comment

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

Unrelated, but I was reading this code and confused at first why it does nothing to close the body. And it's because we haven't set one yet: if d.requestSent is false then the request body is still http.NoBody. So I added a comment for future me :)

@jhump jhump merged commit 99d6b9c into main Sep 13, 2024
14 checks passed
@jhump jhump deleted the jh/fix-error-message branch September 13, 2024 17:33
@jhump jhump added the bug Something isn't working label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants