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

sdk: check for empty response body before unmarshalling #879

Merged
merged 2 commits into from
Feb 9, 2024
Merged

Conversation

catriona-m
Copy link
Member

Fixes a bug with Maintenance Delete where the response body is empty, but not nil, so this does not get unmarshalled.

@catriona-m catriona-m requested a review from a team as a code owner February 9, 2024 11:58
@github-actions github-actions bot added the release-once-merged The SDK should be released once this PR is merged label Feb 9, 2024
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

One comment that we should fix this for XML too, but otherwise 👍

Comment on lines +192 to +195
// In some cases the respBody is empty, but not nil, so don't attempt to unmarshal this
if len(respBody) == 0 {
return nil
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Mind implementing the same fix for XML deserialization too (but not for the bytes deserialization, which'd want that context)?

@catriona-m catriona-m merged commit d97d090 into main Feb 9, 2024
5 checks passed
@catriona-m catriona-m deleted the respbug branch February 9, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

2 participants