High-level rest client ElasticsearchStatusException instead of VersionConflictEngineException


(Vaughn) #1

Hi,

I used to catch DocumentAlreadyExistsException from the java TransportClient, but I'm busy migrating to ES 6 and the docs say it's now VersionConflictEngineException. My problem is that I only get ElasticsearchStatusException from the high-level rest client, and not the specific exception. Is there a best practice for handling this or converting the embedded exception in to the relevant exception?

org.elasticsearch.ElasticsearchStatusException: Elasticsearch exception [type=version_conflict_engine_exception, reason=[siteConfig][test1]: version conflict, document already exists (current version [1])]

Thanks,
Vaughn


(Kevin Bourne) #2

Having the same type of problem, mainly it is not clearly stated in the documentation when and what exceptions are thrown and for what reason.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.