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: handle missing response body #111

Merged
merged 5 commits into from
Apr 27, 2021
Merged

fix: handle missing response body #111

merged 5 commits into from
Apr 27, 2021

Conversation

padamstx
Copy link
Member

@padamstx padamstx commented Apr 23, 2021

This PR contains changes to the BaseService.Request() function to handle scenarios where we expect a response body for an operation invocation but one was not returned by the server. This might occur in situations where an operation could return multiple success status codes, some with and some without a response body (think 202 with a response body and a 204 without a response body).
This new behavior aligns with the current behavior of the Java core where a null result object would be returned to the SDK user if a response was expected but no response body was received.

@padamstx padamstx requested review from mkistler and pyrooka April 23, 2021 17:14
Copy link
Contributor

@mkistler mkistler left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

@padamstx padamstx self-assigned this Apr 23, 2021
@padamstx padamstx merged commit 2f857c2 into main Apr 27, 2021
@padamstx padamstx deleted the mdk/empty-body branch April 27, 2021 14:59
ibm-devx-sdk pushed a commit that referenced this pull request Apr 27, 2021
## [5.4.1](v5.4.0...v5.4.1) (2021-04-27)

### Bug Fixes

* support expected (but empty) response body ([#111](#111)) ([2f857c2](2f857c2))
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 5.4.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants