400 error responses with no body are difficult to debug

Bug #1248773 reported by Russell Sim
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Fix Released
Undecided
Russell Sim

Bug Description

currenty if the response has no error body all that will be returned from the request is a error that looks like

Details: {u'badRequest': {u'message': u'Invalid input received: Bad request', u'code': 400}}

This will probably only occur in 2 cases: Header Line Too Long and Headers Too Large. They ar responses returned from eventlet and can't be returned with a JSON body.

It would be much easier to debug these problem if the HTTP reason code is encoded in the message instead of being thrown away.

e.g.

Details: {u'badRequest': {u'message': u'Invalid input received: Header Line Too Long', u'code': 400}}

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

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

Changed in python-cinderclient:
assignee: nobody → Russell Sim (russell-sim)
status: New → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to python-cinderclient (master)

Reviewed: https://review.openstack.org/55478
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=52ce0b205e336d7545947a13b4a4f3dfc490d51e
Submitter: Jenkins
Branch: master

commit 52ce0b205e336d7545947a13b4a4f3dfc490d51e
Author: Russell Sim <email address hidden>
Date: Thu Nov 7 11:28:05 2013 +1100

    When there is no error body return the HTTP reason

    Return the response reason when there is no message body to return.

    DocImpact
    Change-Id: Ia60da4f04b059a13fcbe0059bb42fd77f272d8aa
    Closes-Bug: 1248773

Changed in python-cinderclient:
status: In Progress → Fix Committed
Changed in python-cinderclient:
milestone: none → 1.3.1
status: Fix Committed → Fix Released
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.