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

improve handling of nil responses and responses with malformed headers #932

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

manicminer
Copy link
Contributor

@manicminer manicminer commented Mar 19, 2024

@manicminer manicminer added the bug Something isn't working label Mar 19, 2024
@manicminer manicminer requested a review from a team as a code owner March 19, 2024 17:45
@github-actions github-actions bot added the release-once-merged The SDK should be released once this PR is merged label Mar 19, 2024
@tombuildsstuff tombuildsstuff merged commit 85c19b2 into main Mar 19, 2024
6 checks passed
@tombuildsstuff tombuildsstuff deleted the bugfix/nil-resp-check-when-unmarshalling branch March 19, 2024 17:57
}

var contentType string
if r.Response.Header != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

actually, we do't need to check if the Header is nil here r.Response.Header.Get won't panic even the Header is nil when that r.Response is not nil.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release-once-merged The SDK should be released once this PR is merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants