]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
heat API : Add HeatAPINotImplementedError exception
authorSteven Hardy <shardy@redhat.com>
Wed, 22 Aug 2012 08:54:08 +0000 (09:54 +0100)
committerSteven Hardy <shardy@redhat.com>
Thu, 23 Aug 2012 17:30:19 +0000 (18:30 +0100)
Add heat-specific HeatAPINotImplementedError, which
allows us to return a sensible error to requests for
API actions which have not yet been implemented

Change-Id: Ibaee8312e7e563d29801bd325d7638bca9efa622
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat/api/aws/exception.py

index eb63aa7ab2309eeb7c0ded9a96a69504ea87da91..4450a74f7746395a9c4dfa606f2ec00f92dd1590 100644 (file)
@@ -226,6 +226,17 @@ class HeatSignatureError(HeatAPIException):
                    "signature you provided")
 
 
+# Heat-specific errors
+class HeatAPINotImplementedError(HeatAPIException):
+    '''
+    This is the response given when an API action is not yet implemented
+    '''
+    code = 500
+    title = "APINotImplemented"
+    explanation = ("The requested action is not yet implemented")
+    err_type = "Server"
+
+
 def map_remote_error(ex):
         """
         Map rpc_common.RemoteError exceptions returned by the engine