From: Angus Salkeld Date: Thu, 15 Mar 2012 05:49:50 +0000 (+1100) Subject: Add missing RequestUriTooLong exception. X-Git-Tag: 2014.1~2211 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=97b6c95df0138b76dc1b75dd266f4d7c4ff37b70;p=openstack-build%2Fheat-build.git Add missing RequestUriTooLong exception. Signed-off-by: Angus Salkeld --- diff --git a/heat/common/client.py b/heat/common/client.py index 1e1a1248..e667ce2e 100644 --- a/heat/common/client.py +++ b/heat/common/client.py @@ -525,6 +525,8 @@ class BaseClient(object): raise exception.MultipleChoices(body=res.read()) elif status_code == httplib.INTERNAL_SERVER_ERROR: raise Exception("Internal Server error: %s" % res.read()) + elif status_code == httplib.REQUEST_URI_TOO_LONG: + raise exception.RequestUriTooLong(body=res.read()) else: raise Exception("Unknown error occurred! %s" % res.read()) diff --git a/heat/common/exception.py b/heat/common/exception.py index 0c8a45b4..8e4ef7a7 100644 --- a/heat/common/exception.py +++ b/heat/common/exception.py @@ -141,6 +141,8 @@ class MultipleChoices(HeatException): "means that you have not included a version indicator in a " "request URI.\n\nThe body of response returned:\n%(body)s") +class RequestUriTooLong(HeatException): + message = _("The URI was too long.") class InvalidContentType(HeatException): message = _("Invalid content type %(content_type)s")