Bug 811145 - [REST API] Error message is not clear when trying to query applications for a non-existing domain
[REST API] Error message is not clear when trying to query applications for a...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Pod (Show other bugs)
1.x
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Lili Nader
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-10 05:33 EDT by Johnny Liu
Modified: 2014-10-26 16:41 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-27 16:46:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Johnny Liu 2012-04-10 05:33:15 EDT
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@redhat.com: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 16:45:16 EDT
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-23 23:57:52 EDT
Verified this bug on devenv_1738, and PASS.

$ curl -k -X GET -H 'Accept: application/xml' --user jialiu@redhat.com: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>

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