elasticsearch-py icon indicating copy to clipboard operation
elasticsearch-py copied to clipboard

Failure in __str__ of NotFoundError

Open bobbyi opened this issue 6 years ago • 0 comments

When trying to lookup an alias that does not exist using code like

client.indices.get_alias(name='bogus')

, a elasticsearch.exceptions.NotFoundError is raised. This is expected.

However when the traceback is being generated for that exception, I end up hitting the error TypeError('string indices must be integers',) from the __str__ method in elasticsearch/exceptions.py on line 58 which is:

cause = ', %r' % self.info['error']['root_cause'][0]['reason']

This is with the latest version of elasticsearch-py (6.3.1) on Python 2.7.15

bobbyi avatar Feb 07 '19 01:02 bobbyi