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.
Reviewed: https:/ /review. openstack. org/95917 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=08154b043c3 5a00e911592d63f 648e654e14baa6
Committed: https:/
Submitter: Jenkins
Branch: stable/icehouse
commit 08154b043c35a00 e911592d63f648e 654e14baa6
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: Ieb8de26465cb26 aa015f15c134f80 a06ebcae95c
Closes-Bug: #1301657
Related-Bug: #1304743