FaultWrapper error mapping ignores parent classes

Bug #1232885 reported by Steve Baker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Pablo Andres Fuente

Bug Description

Any exception that subclasses an exception mapped in FaultWrapper.error_map will raise an http 500 error instead of the mapped http error.

FaultWrapper should also map against all parent types of an exception.

Revision history for this message
Faramir (faramir) wrote : AUTO: Hai Liang Wang is on vacation from 09-29 to 10-08 (returning 10/09/2013)

I am out of the office until 10/09/2013.

Conact me by phone for anything urgency.
Phone Number - 15801213126 . thanks !

Note: This is an automated response to your message "[Bug 1232885] [NEW]
FaultWrapper error mapping ignores parent classes" sent on 09/30/2013
4:08:46.

This is the only notification you will receive while this person is away.

Changed in heat:
assignee: nobody → Pablo Andres Fuente (pablo-a-fuente)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/57001
Committed: http://github.com/openstack/heat/commit/27e518c5c8ffaf47c4599eff76eeaa1e32b33ff8
Submitter: Jenkins
Branch: master

commit 27e518c5c8ffaf47c4599eff76eeaa1e32b33ff8
Author: Pablo Andres Fuente <email address hidden>
Date: Mon Nov 18 14:43:25 2013 -0300

    FaultWrapper error mapping supports parent classes

    Now the FaultWrapper middleware maps exceptions to webob ones using
    a recursive method: if the exception itself is not in the error_map
    dictionary, the method searches the first parent exception that has a
    match in the same dictionary.
    Without this change "any exception that subclasses an exception mapped
    in FaultWrapper.error_map will raise an http 500 error instead of the
    mapped http error. FaultWrapper should also map against all parent
    types of an exception."
    Two unit test were added: one to reproduce the bug and another to test
    the fix when remote exceptions are handled.

    Change-Id: I387e0acf35a4d6361494117218d5129f00d77eb7
    Closes-Bug: #1232885

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-1 → 2014.1
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.