Permalink
Browse files

Merge new spelling of "index already exists" so we raise the right ex…

…ceptions. Close #195.
  • Loading branch information...
2 parents 01b0cb7 + 41dd33a commit 21c2b244fe0ee87241141fb01eb59a63d86d77c5 @erikrose erikrose committed on GitHub Feb 2, 2017
Showing with 1 addition and 0 deletions.
  1. +1 −0 pyelasticsearch/client.py
@@ -293,6 +293,7 @@ def _raise_exception(self, status, error_message):
error_class = ElasticHttpNotFoundError
elif (hasattr(error_message, 'startswith') and
(error_message.startswith('IndexAlreadyExistsException') or
+ error_message.startswith('index_already_exists_exception') or
'nested: IndexAlreadyExistsException' in error_message)):
error_class = IndexAlreadyExistsError

0 comments on commit 21c2b24

Please sign in to comment.