Bug 811145 - [REST API] Error message is not clear when trying to query applications for a non-existing domain
Summary: [REST API] Error message is not clear when trying to query applications for a...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 1.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Lili Nader
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-10 09:33 UTC by Johnny Liu
Modified: 2014-10-26 20:41 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-27 20:46:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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>


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