Comment 6 for bug 1301657

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/icehouse)

Reviewed: https://review.openstack.org/95917
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=08154b043c35a00e911592d63f648e654e14baa6
Submitter: Jenkins
Branch: stable/icehouse

commit 08154b043c35a00e911592d63f648e654e14baa6
Author: Steve Baker <email address hidden>
Date: Wed Apr 9 14:38:48 2014 +1200

    Allow NotFound to be created without args

    It appears that the serialization used to wrap RPC exceptions
    requires that the class be instantiated without any arguments.

    Since the NotFound exception required a msg_fmt it could not be
    deserialized in heat-api, which lead to no mapping in the FaultWrapper
    so a 500 was raised instead of a 404.

    This change adds a default value for msg_fmt for the NotFound exception.

    The classes Error and ResourceFailure likely have this issue too, but it
    is not as serious since they will raise a 500 error anyway.

    Config/deployment API tests now check that NotFound can be deserialized by
    calling to_remote_error, and checks that FaultWrapper converts that to
    HTTPNotFound.

    Change-Id: Ieb8de26465cb26aa015f15c134f80a06ebcae95c
    Closes-Bug: #1301657
    Related-Bug: #1304743