Running "glance --os-image-api-version 2 image-list --visibility test" with incorrect --visibility option throws unclear error.

Bug #1403422 reported by Kanchan Gupta
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Incomplete
Undecided
yalei wang

Bug Description

I was trying to check image-list based on visibility by using the following command:

glance --os-image-api-version 2 image-list --visibility test

But I got output:

<html>
 <head>
  <title>400 Bad Request</title>
 </head>
 <body>
  <h1>400 Bad Request</h1>
  Invalid visibility value: test<br /><br />

 </body>
</html> (HTTP 400)

which does not provide any clear information.

Expected result:
Glance should throw an exception with proper message.

Changed in glance:
assignee: nobody → Kanchan Gupta (kanchan-gupta1)
Changed in glance:
assignee: Kanchan Gupta (kanchan-gupta1) → nobody
yalei wang (yalei-wang)
Changed in glance:
assignee: nobody → yalei wang (yalei-wang)
Revision history for this message
Kamil Rykowski (kamil-rykowski) wrote :

Isn't "Invalid visibility value: test" a clear error message? Can it be even more accurate?

Changed in glance:
status: New → Incomplete
Revision history for this message
Kanchan Gupta (kanchan-gupta1) wrote :

Yes the error message "Invalid visibility value: test" is clear, but the format(html) for displaying the message is not user friendly. IMO the html tags can be avoided so as to get more clear message.

Revision history for this message
Erno Kuvaja (jokke) wrote :

There is nothing wrong with the error message, but last comment indicates that this is duplicate with the client bug for removing the html tags from printouts.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.