summaryrefslogtreecommitdiff
path: root/boto
diff options
context:
space:
mode:
authorDaniel G. Taylor <dan@programmer-art.org>2014-08-01 13:04:37 -0700
committerDaniel G. Taylor <dan@programmer-art.org>2014-08-01 13:04:37 -0700
commit494a0916a858cdb065eee5fbd4be70bf5f95cbc8 (patch)
tree7af713437e5c0c8a993aee5aee5cdd13ecab25ea /boto
parent9808a77bcb11aeee1224998313fb6fcdf7dc3c8e (diff)
parentac28d96e10bd8f471f38f1bd519191c3f5eb224e (diff)
downloadboto-494a0916a858cdb065eee5fbd4be70bf5f95cbc8.tar.gz
Merge pull request #2370 from danielrhammond/fix-cloudsearch-commit-response-keyerror
Handle Cloudsearch indexing errors. Fixes #2370.
Diffstat (limited to 'boto')
-rw-r--r--boto/cloudsearch/document.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/boto/cloudsearch/document.py b/boto/cloudsearch/document.py
index b5a6b455..0a1d9db2 100644
--- a/boto/cloudsearch/document.py
+++ b/boto/cloudsearch/document.py
@@ -240,6 +240,9 @@ class CommitResponse(object):
raise EncodingError("Illegal Unicode character in document")
elif e == "The Content-Length is too long":
raise ContentTooLongError("Content was too long")
+ if 'adds' not in self.content or 'deletes' not in self.content:
+ raise SearchServiceException("Error indexing documents"
+ " => %s" % self.content.get('message', ''))
else:
self.errors = []