Bug 811145

Summary: [REST API] Error message is not clear when trying to query applications for a non-existing domain
Product: OKD Reporter: Johnny Liu <jialiu>
Component: PodAssignee: Lili Nader <lnader>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 1.xCC: lnader, mfisher, rmillner
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-27 20:46:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Johnny Liu 2012-04-10 09:33:15 UTC
Description of problem:
The domain id is "newjialiu" now, try to query applications for jialiu domain.
$ curl -k -X GET -H 'Accept: application/xml' --user jialiu:214214 https://ec2-107-21-165-94.compute-1.amazonaws.com/broker/rest/domains/jialiu/applications
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <data>
    <datum nil="true"></datum>
  </data>
  <type nil="true"></type>
  <version>1.0</version>
  <messages>
    <message>
      <exit-code>127</exit-code>
      <field nil="true"></field>
      <text>Domain 70213722511460 not found.</text>
      <severity>error</severity>
    </message>
  </messages>
  <status>not_found</status>
</response>


In the text element, it is said that "Domain 70213722511460 not found", it should be "Domain jialiu not found"

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

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Lili Nader 2012-04-23 20:45:16 UTC
I cannot reproduce this in the latest build.  So it must have been fixed.  However, as a result of the fix to bug

https://bugzilla.redhat.com/show_bug.cgi?id=814379

The error message returned will not have the domain name in it since it may be part of an injection attack.

Comment 2 Johnny Liu 2012-04-24 03:57:52 UTC
Verified this bug on devenv_1738, and PASS.

$ curl -k -X GET -H 'Accept: application/xml' --user jialiu:214214 https://ec2-184-73-43-155.compute-1.amazonaws.com/broker/rest/domains/jialiu/applications
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <messages>
    <message>
      <text>Domain not found.</text>
      <exit-code>127</exit-code>
      <severity>error</severity>
      <field nil="true"></field>
    </message>
  </messages>
  <data>
    <datum nil="true"></datum>
  </data>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
  </supported-api-versions>
  <type nil="true"></type>
  <version>1.0</version>
  <status>not_found</status>
</response>