diff --git a/nova/api/openstack/compute/plugins/v3/servers.py b/nova/api/openstack/compute/plugins/v3/servers.py index 3e3233dcb7c9..4d0d14a029e2 100644 --- a/nova/api/openstack/compute/plugins/v3/servers.py +++ b/nova/api/openstack/compute/plugins/v3/servers.py @@ -794,11 +794,7 @@ class ServersController(wsgi.Controller): @wsgi.action('rebuild') def _action_rebuild(self, req, id, body): """Rebuild an instance with the given attributes.""" - try: - rebuild_dict = body['rebuild'] - except (KeyError, TypeError): - msg = _('Invalid request body') - raise exc.HTTPBadRequest(explanation=msg) + rebuild_dict = body['rebuild'] try: image_href = rebuild_dict["image_ref"] diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index 64be71d96fe9..863e89463d07 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -1304,11 +1304,7 @@ class Controller(wsgi.Controller): @wsgi.action('rebuild') def _action_rebuild(self, req, id, body): """Rebuild an instance with the given attributes.""" - try: - body = body['rebuild'] - except (KeyError, TypeError): - msg = _('Invalid request body') - raise exc.HTTPBadRequest(explanation=msg) + body = body['rebuild'] try: image_href = body["imageRef"]