Bug 1285390 - REST error message suggests description but there is none
Summary: REST error message suggests description but there is none
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ovirt-4.0.0-alpha
: 4.0.0
Assignee: Ori Liel
QA Contact: Lukas Svaty
Depends On:
TreeView+ depends on / blocked
Reported: 2015-11-25 14:13 UTC by jniederm
Modified: 2016-08-01 12:26 UTC (History)
2 users (show)

Fixed In Version: ovirt 4.0.0 alpha1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-08-01 12:26:25 UTC
oVirt Team: Infra
rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
juan.hernandez: devel_ack+
pstehlik: testing_ack+

Attachments (Terms of Use)
stack_trace.txt (28.69 KB, text/plain)
2015-11-25 14:13 UTC, jniederm
no flags Details

System ID Private Priority Status Summary Last Updated
oVirt gerrit 49308 0 master MERGED restapi: Use "SystemResource" to find root collections Never
oVirt gerrit 53957 0 master ABANDONED restapi: Ignore version prefix in "UsageFinder" 2016-03-30 15:06:12 UTC
oVirt gerrit 55350 0 master MERGED restapi: Fix missing description for bad request 2016-03-28 14:07:51 UTC

Description jniederm 2015-11-25 14:13:47 UTC
Created attachment 1098826 [details]

Description of problem:
Error message generated as response to malformed REST API request suggests some "description". However the response doesn't contain any.

Version-Release number of selected component (if applicable):
4.0 master, commit 5e447e0

How reproducible:

Steps to Reproduce:
POST /ovirt-engine/api/vmpools HTTP/1.1
Host: localhost:8080
Authorization: Basic YWRtaW5AaW50ZXJuYWw6YQ==
Content-Type: application/xml


Actual results:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <message>Request syntactically incorrect. See the description below for the correct usage:</message>

and error in engine log, see attachement

Expected results:
Some meaningful, descriptive error message

Additional info:

Comment 1 Juan Hernández 2015-11-27 11:00:44 UTC
Note that this is more severe than just not showing the description, what actually happens is that the RSDL document is generated incorrectly, almost empty. The proposed patch fixes the generation of the RSDL, and then the description is shown correctly.

Comment 2 jniederm 2016-02-23 22:19:03 UTC
Hi Juan, I can still reproduce the bug on current 4.0 master (commit 904ab61) using steps to reproduce in comment 0. Is it supposed to be fixed or not yet?

Comment 3 Juan Hernández 2016-02-24 09:38:57 UTC
The original issue was fixed. But then the introduction of the support for multiple versions introduced a new regression, which has the same effect. The following patch fixes it:

  restapi: Ignore version prefix in "UsageFinder"

Comment 4 Red Hat Bugzilla Rules Engine 2016-02-24 09:39:02 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 5 Lukas Svaty 2016-08-01 07:54:08 UTC
verified in ovirt-engine-restapi-

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <detail>For correct usage, see: https://*hostname*/ovirt-engine/api/v4/model#services/vms/methods/add</detail>
    <reason>Request syntactically incorrect.</reason>

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