summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-11-21 05:11:42 +0000
committerGerrit Code Review <review@openstack.org>2012-11-21 05:11:42 +0000
commitcf26ec71a6d4e114b11d1b7b6ddc007f93a9564f (patch)
tree9f40f2a5430de65701fa743fe5ab09b9e153da87 /nova/api
parent210afea928bbbda2fe2fb575c76623b9d04e203e (diff)
parenta19d64808f3c4ab1cc3306ac3678701d0fff3e87 (diff)
downloadnova-cf26ec71a6d4e114b11d1b7b6ddc007f93a9564f.tar.gz
nova-cf26ec71a6d4e114b11d1b7b6ddc007f93a9564f.tar.xz
nova-cf26ec71a6d4e114b11d1b7b6ddc007f93a9564f.zip
Merge "Return an error response if the specified flavor does not exists. (v4)"
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/servers.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
index 1b758f23f..e386ee1c7 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -540,6 +540,9 @@ class Controller(wsgi.Controller):
except exception.MarkerNotFound as e:
msg = _('marker [%s] not found') % marker
raise webob.exc.HTTPBadRequest(explanation=msg)
+ except exception.FlavorNotFound as e:
+ msg = _("Flavor could not be found")
+ raise webob.exc.HTTPUnprocessableEntity(explanation=msg)
if is_detail:
self._add_instance_faults(context, instance_list)