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:
Boris Odnopozov: Looks good to me, but someone else must approve
Juan Hernandez: Verified; Looks good to me, approved
Jenkins CI: Passed CI tests
--
To view, visit
https://gerrit.ovirt.org/61657
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If898a44b964bce3944e008dc8e10a2866f180452
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine-sdk-ruby
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Boris Odnopozov <bodnopoz(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>