summaryrefslogtreecommitdiff
path: root/boto/exception.py
diff options
context:
space:
mode:
authorMitch Garnaat <mitch@garnaat.com>2012-05-15 18:59:46 -0700
committerMitch Garnaat <mitch@garnaat.com>2012-05-15 18:59:46 -0700
commit1aa1133e8502ea6c95e49ac34681569df5ace46b (patch)
treea25397b20d7d409131ccfbfce5d4dca23d7e52a4 /boto/exception.py
parent911f42b97fdccbc55e160ec323df0cad6fe64c6b (diff)
parent6588ea270bfc9e0bb4d17263b72ee8b5255545c5 (diff)
downloadboto-2.4.0.tar.gz
Merge branch 'release-2.4.0'2.4.0
Diffstat (limited to 'boto/exception.py')
-rw-r--r--boto/exception.py36
1 files changed, 33 insertions, 3 deletions
diff --git a/boto/exception.py b/boto/exception.py
index c9eefc4f..cc3526e1 100644
--- a/boto/exception.py
+++ b/boto/exception.py
@@ -322,6 +322,32 @@ class DynamoDBResponseError(BotoServerError):
if self.error_code:
self.error_code = self.error_code.split('#')[-1]
+
+class SWFResponseError(BotoServerError):
+ """
+ This exception expects the fully parsed and decoded JSON response
+ body to be passed as the body parameter.
+
+ :ivar status: The HTTP status code.
+ :ivar reason: The HTTP reason message.
+ :ivar body: The Python dict that represents the decoded JSON
+ response body.
+ :ivar error_message: The full description of the AWS error encountered.
+ :ivar error_code: A short string that identifies the AWS error
+ (e.g. ConditionalCheckFailedException)
+ """
+
+ def __init__(self, status, reason, body=None, *args):
+ self.status = status
+ self.reason = reason
+ self.body = body
+ if self.body:
+ self.error_message = self.body.get('message', None)
+ self.error_code = self.body.get('__type', None)
+ if self.error_code:
+ self.error_code = self.error_code.split('#')[-1]
+
+
class EmrResponseError(BotoServerError):
"""
Error in response from EMR
@@ -376,9 +402,6 @@ class GSDataError(StorageDataError):
"""
pass
-class FPSResponseError(BotoServerError):
- pass
-
class InvalidUriError(Exception):
"""Exception raised when URI is invalid."""
@@ -393,6 +416,13 @@ class InvalidAclError(Exception):
Exception.__init__(self, message)
self.message = message
+class InvalidCorsError(Exception):
+ """Exception raised when CORS XML is invalid."""
+
+ def __init__(self, message):
+ Exception.__init__(self, message)
+ self.message = message
+
class NoAuthHandlerFound(Exception):
"""Is raised when no auth handlers were found ready to authenticate."""
pass