Im using python elastic search module and need to handle exception.
try:
es.index(index='tickets', doc_type='tickets', body=doc)
except es.ElasticsearchException as es1:
print 'error'
but I get this error -
AttributeError: 'Elasticsearch' object has no attribute 'ElasticsearchException'
except elasticsearch.ElasticsearchException as es1and notes.ElasticsearchException