diff options
| author | Andrew Laski <andrew.laski@rackspace.com> | 2013-05-01 21:30:52 -0400 |
|---|---|---|
| committer | Andrew Laski <andrew.laski@rackspace.com> | 2013-05-01 21:34:02 -0400 |
| commit | 051cf0d756d9a9e1d0a5ea1169fa97d89b7885bc (patch) | |
| tree | fc123b53724b87368ad29d4d4b45d46035cc8894 /nova/api | |
| parent | b6aac988e46147154d49e938ecf9b67831613636 (diff) | |
Call format_message on InstanceTypeNotFound exception
Put the exception message from InstanceTypeNotFound into the
HTTPBadRequest rather than the exception itself. Prevents a Circular
reference error during serialization later.
Bug 1175414
Change-Id: I4811e727311af670cd964a6d16ac5fce0fe3186e
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/servers.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index bc4ba67df..94912da97 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -903,7 +903,7 @@ class Controller(wsgi.Controller): except exception.InstanceTypeMemoryTooSmall as error: raise exc.HTTPBadRequest(explanation=error.format_message()) except exception.InstanceTypeNotFound as error: - raise exc.HTTPBadRequest(explanation=error) + raise exc.HTTPBadRequest(explanation=error.format_message()) except exception.InstanceTypeDiskTooSmall as error: raise exc.HTTPBadRequest(explanation=error.format_message()) except exception.InvalidMetadata as error: |
