Client should be able to process the pecan constructed exceptions in the response body

Bug #1619471 reported by Vladyslav Drok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ironicclient
Fix Released
Medium
Vladyslav Drok

Bug Description

Right now, the following problem exists:

ironic node-validate 123~123
Bad Request (HTTP 400)

The error text is ignored, as this is an exception raised by pecan from node controller _lookup method. Unlike wsme exceptions, the response body with this exception looks like this:

{"error_message": "{\"code\": 400, \"description\": \"Expected a logical name or UUID but received 123~123.\", \"title\": \"Bad Request\"}"}

Right now, the description field is ignored and client is looking for faultstring field in the response.

Vladyslav Drok (vdrok)
Changed in python-ironicclient:
assignee: nobody → Vladyslav Drok (vdrok)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ironicclient (master)

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

Changed in python-ironicclient:
status: New → In Progress
Dmitry Tantsur (divius)
Changed in python-ironicclient:
importance: Undecided → Medium
Changed in python-ironicclient:
assignee: Vladyslav Drok (vdrok) → Julia Kreger (juliaashleykreger)
Vladyslav Drok (vdrok)
Changed in python-ironicclient:
assignee: Julia Kreger (juliaashleykreger) → Vladyslav Drok (vdrok)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-ironicclient (master)

Reviewed: https://review.openstack.org/364566
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=fbcaf92521280f5c1cdfb447a17eb2c5b3059ba7
Submitter: Jenkins
Branch: master

commit fbcaf92521280f5c1cdfb447a17eb2c5b3059ba7
Author: Vladyslav Drok <email address hidden>
Date: Fri Sep 2 00:31:24 2016 +0300

    Print pecan exceptions properly

    Exceptions raised by pecan (for example the ones happening in _lookup
    methods of ironic controllers) are not properly handled, as the
    fields that contain the error details are different from wsme raised
    exceptions. This change fixes it.

    Closes-Bug: #1619471
    Change-Id: I023870ed97d3e97df8ae67e7cec97d6fbf355e79

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

This issue was fixed in the openstack/python-ironicclient 1.12.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.