error message shows redundant information

Bug #1598714 reported by Bhagyashri Shewale
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Undecided
Jaspreet Singh Rawel

Bug Description

As of now when any api fails, it shows error code twice in the error message.

For Example:
Following error message will be displayed for non existing image:

$ glance image-show <non-existing-image-id>

Error message:
404 Not Found: No image found with ID <non-existing-image-id> (HTTP 404)

In this case 404 is shown twice.

Changed in python-glanceclient:
assignee: nobody → Bhagyashri Shewale (bhagyashri-shewale)
Revision history for this message
Jaspreet Singh Rawel (jaspreetsinghrawel) wrote :

root@controller:/home/ubuntu# glance --version
2.0.0
root@controller:/home/ubuntu#
root@controller:/home/ubuntu#
root@controller:/home/ubuntu#
root@controller:/home/ubuntu#
root@controller:/home/ubuntu# glance image-list
+--------------------------------------+--------+
| ID | Name |
+--------------------------------------+--------+
| a109d73c-331f-4b30-b2f0-36cda7875560 | cirros |
+--------------------------------------+--------+
root@controller:/home/ubuntu#
root@controller:/home/ubuntu#
root@controller:/home/ubuntu# glance image-show a109d73c-331f-4b30-b2f0-36cda7875561
404 Not Found: No image found with ID a109d73c-331f-4b30-b2f0-36cda7875561 (HTTP 404)
root@controller:/home/ubuntu#

Changed in python-glanceclient:
status: New → Incomplete
status: Incomplete → Confirmed
Changed in python-glanceclient:
assignee: Bhagyashri Shewale (bhagyashri-shewale) → Jaspreet Singh Rawel (jaspreetsinghrawel)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/402145

Changed in python-glanceclient:
status: Confirmed → In Progress
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-glanceclient (master)

Change abandoned by Brian Rosmaita (<email address hidden>) on branch: master
Review: https://review.openstack.org/402145
Reason: Abandoning as a duplicate (other patch is actually older).

Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

Could someone explain why this is a bug? I'm worried about a client relying on parsing the output looking for '(HTTP xxx)'. The error code is mentioned twice, but so what? I need convincing that this change will actually do some good, because it's clear that it could break some clients.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/475351
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=ae4355be01c0b4bcf5b6bdd2c1163b3f6df3e213
Submitter: Zuul
Branch: master

commit ae4355be01c0b4bcf5b6bdd2c1163b3f6df3e213
Author: bhagyashris <email address hidden>
Date: Thu Jun 30 18:34:14 2016 +0530

    Remove redundant information from error message

    Currently user get redundant HTTP error code in error message.
    Removed redundant HTTP error code from the message.

    For Example:
    Error message display when user trying to get the non existing image:
    $ glance image-show f433471a-53a8-4d31-bf8f-f0b6b594dfc
    Error message:
    404 Not Found: No image found with ID f433471a-53a8-4d31-bf8f-f0b6b594dfc (HTTP 404)

    After this fix:
    HTTP 404 Not Found: No image found with ID f433471a-53a8-4d31-bf8f-f0b6b594dfc

    Closes-Bug: #1598714
    Change-Id: I33971a2a16416c8538158299325471c2a69dbb3e

Changed in python-glanceclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-glanceclient 2.16.0

This issue was fixed in the openstack/python-glanceclient 2.16.0 release.

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.