summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-09-19 00:25:59 +0000
committerGerrit Code Review <review@openstack.org>2012-09-19 00:25:59 +0000
commit0ffff7c490d54f9b932df4b2dcd62158242dae2a (patch)
tree35d6c03d6a3c5a8d7b10c31e60400f04c2273fe2 /nova/api
parent5a349b82fc62c5bde0f93a25df8acfe9474bd3fd (diff)
parentf4906f07cd49e4deae79018d7f586b16266859eb (diff)
downloadnova-0ffff7c490d54f9b932df4b2dcd62158242dae2a.tar.gz
nova-0ffff7c490d54f9b932df4b2dcd62158242dae2a.tar.xz
nova-0ffff7c490d54f9b932df4b2dcd62158242dae2a.zip
Merge "Raise BadRequest while creating server with invalid personality"
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 c9bc4430e..18161b830 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -843,6 +843,9 @@ class Controller(wsgi.Controller):
msg = "%(err_type)s: %(err_msg)s" % {'err_type': err.exc_type,
'err_msg': err.value}
raise exc.HTTPBadRequest(explanation=msg)
+ except UnicodeDecodeError as error:
+ msg = "UnicodeError: %s" % unicode(error)
+ raise exc.HTTPBadRequest(explanation=msg)
# Let the caller deal with unhandled exceptions.
# If the caller wanted a reservation_id, return it