On exception, the client should strip HTML tags

Bug #1416447 reported by Ian Cordasco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Invalid
Medium
Unassigned

Bug Description

Some exceptions are returned by webob (and other frameworks) as HTML. The client should strip the tags to make the error message more explicit and easier to read.

For example:
2015-01-30 15:15:30.513 | ++ openstack --os-token 3da24a51127b4c5da73570cc35b5afd7 --os-url http://10.\
0.3.15:9292 image create ubuntu-14.04-server-cloudimg-amd64-kernel --public --container-format aki --d\
isk-format aki
2015-01-30 15:15:30.514 | ++ get_field 2
2015-01-30 15:15:30.517 | ++ grep ' id '
2015-01-30 15:15:30.519 | ++ local data field
2015-01-30 15:15:30.521 | ++ read data
2015-01-30 15:15:39.176 | ERROR: openstack <html>
2015-01-30 15:15:39.177 | <head>
2015-01-30 15:15:39.177 | <title>401 Unauthorized</title>
2015-01-30 15:15:39.177 | </head>
2015-01-30 15:15:39.177 | <body>
2015-01-30 15:15:39.177 | <h1>401 Unauthorized</h1>
2015-01-30 15:15:39.177 | This server could not verify that you are authorized to access the documen\
t you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does \
not understand how to supply the credentials required.<br /><br />

description: updated
Changed in python-openstackclient:
status: New → Confirmed
importance: Undecided → Medium
Changed in python-openstackclient:
assignee: nobody → sai krishna (krishna1256)
Changed in python-openstackclient:
assignee: sai krishna (krishna1256) → nobody
Revision history for this message
Juan Antonio Osorio Robles (juan-osorio-robles) wrote :

Ian, is this still a bug? I couldn't reproduce it with that command.

Revision history for this message
Juan Antonio Osorio Robles (juan-osorio-robles) wrote :

Maybe it's a bug with other commands, since I guess it's API dependant. But I haven't a command that displays this behaviour

Revision history for this message
jiaxi (tjxiter) wrote :

I can't reproduce it either.

Revision history for this message
Steve Martinelli (stevemar) wrote :

Ian, I am getting the following:

vagrant-ubuntu-trusty-64 devstack $ openstack --os-token blah --os-url http://10.0.2.15:9292 image create ubuntu-14.04-server-cloudimg-amd64-kernel --public --container-format aki --disk-format aki
ERROR: openstack 401 Unauthorized: This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required. (HTTP 401)

Since this seems OK to me, I'm going to resolve this bug as invalid, let me know if it happens again or if you disagree.

Changed in python-openstackclient:
status: Confirmed → Invalid
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.