Juan Hernandez has submitted this change and it was merged.
Change subject: Handle correctly error responses without body
......................................................................
Handle correctly error responses without body
Currently when the SDK receives a response with an error code but
without a body it generates an incorrect exception because it tries to
create an XML reader that wasn't actually created. To avoid that this
patch changes the SDK so that it checks if the response body is empty,
and in that case it doesn't try to create or close the XML reader.
Change-Id: If898a44b964bce3944e008dc8e10a2866f180452
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
---
M sdk/lib/ovirtsdk4/service.rb
M sdk/spec/service_spec.rb
2 files changed, 50 insertions(+), 5 deletions(-)
Approvals:
Juan Hernandez: Verified; Looks good to me, approved
Jenkins CI: Passed CI tests
--
To view, visit
https://gerrit.ovirt.org/61675
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If898a44b964bce3944e008dc8e10a2866f180452
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-sdk-ruby
Gerrit-Branch: sdk_4.0
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>