Bug 1571648 - Detailed message in Error SDK
Summary: Detailed message in Error SDK
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine-sdk-java
Classification: oVirt
Component: General
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.2.4
: 4.2.3
Assignee: Ondra Machacek
QA Contact: Radim Hrazdil
URL:
Whiteboard:
Depends On:
Blocks: 1582077
TreeView+ depends on / blocked
 
Reported: 2018-04-25 09:36 UTC by francisco.garcia
Modified: 2018-06-26 08:34 UTC (History)
3 users (show)

Fixed In Version: java-ovirt-engine-sdk4-4.2.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-26 08:34:26 UTC
oVirt Team: Reports
rule-engine: ovirt-4.2+


Attachments (Terms of Use)
Sample instance Error SDK in debug Eclipse when I try create a Vm with a duplicated name in RHVM (89.21 KB, image/png)
2018-04-25 09:36 UTC, francisco.garcia
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 90850 0 master MERGED DecompressingEntity can't calculate content-length 2018-05-02 15:10:48 UTC
oVirt gerrit 90852 0 sdk_4.2 MERGED DecompressingEntity can't calculate content-length 2018-05-04 05:18:18 UTC

Description francisco.garcia 2018-04-25 09:36:00 UTC
Created attachment 1426505 [details]
Sample instance Error SDK in debug Eclipse when I try create a Vm with a duplicated name in RHVM

Description of problem:
The lack information that contains the Error's message when it is thrown. How can I get more information about that error?

Version-Release number of selected component (if applicable):


How reproducible:
Any exception thrown by sdk is valid.

For example, a common error easy to reproduce is try create a Vm with same name that a Vm has already been registered.


Steps to Reproduce:
1. Create a Vm with name "vm1"
2. Try create a Vm with name "vm1" using java-sdk.

Actual results:
As we see in the image attached, the fields of the error are ambiguous, and they don't reflect the error specifically. Basically the error show the message: 
"HTTP response code is "409". HTTP response message is "Conflict"."

However, if we look at the RHVM's log in file: /var/log/ovirt-engine/engine.log, the message reflect this: 
2018-04-24 17:39:53,514+02 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-22) [] Operation Failed: [Import VM failed - VM Name already exist in the Data Center. Please rename the VM in the Data Center first
  
Expected results:
A message error as the server would be good, to obtain more information.

Comment 1 Radim Hrazdil 2018-05-30 06:31:58 UTC
Verified that attempt to create a vm with an already existing name fails with detail message: "[Cannot add VM. The VM name is already in use, please choose a unique name and try again.]".

java-ovirt-engine-sdk4-4.2.3-1.el7ev.noarch

Comment 2 Sandro Bonazzola 2018-06-26 08:34:26 UTC
This bugzilla is included in oVirt 4.2.4 release, published on June 26th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.4 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.