Skip to content

[v2] [core]: handle empty response body#3195

Merged
kayrus merged 1 commit intov2from
bp-v2-9c94b95
Oct 4, 2024
Merged

[v2] [core]: handle empty response body#3195
kayrus merged 1 commit intov2from
bp-v2-9c94b95

Conversation

@gophercloud-backport-bot
Copy link
Copy Markdown

Backport: #3188

Fixes gophercloud/utils#198

Not sure whether we need to adjust the utils itself like gophercloud/utils#230

I'm not sure whether we need to check for err != io.EOF in the doRequest's json.NewDecoder(resp.Body).Decode(options.JSONResponse). It's not clear whether API should return body or not, e.g. [] or {} or an empty response.

@github-actions github-actions bot added edit:networking This PR updates networking code v2 This PR targets v2 semver:patch No API change labels Oct 4, 2024
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 78.708%. remained the same
when pulling 113e3c4 on bp-v2-9c94b95
into 1737ff4 on v2.

@kayrus kayrus merged commit 75a970d into v2 Oct 4, 2024
@kayrus kayrus deleted the bp-v2-9c94b95 branch October 4, 2024 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

edit:networking This PR updates networking code semver:patch No API change v2 This PR targets v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants