]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Add missing RequestUriTooLong exception.
authorAngus Salkeld <asalkeld@redhat.com>
Thu, 15 Mar 2012 05:49:50 +0000 (16:49 +1100)
committerAngus Salkeld <asalkeld@redhat.com>
Thu, 15 Mar 2012 05:49:50 +0000 (16:49 +1100)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
heat/common/client.py
heat/common/exception.py

index 1e1a12483dc44fe3943921ec6b1ec701138f497c..e667ce2edfb82730ca0e54cc322b38ff6ccad2ed 100644 (file)
@@ -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())
 
index 0c8a45b47c23721f69a377e45357c83065ad6e5b..8e4ef7a7ed72237c32343f04501643b640192057 100644 (file)
@@ -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")