The AlgoliaRuntimeException is thrown when an error occurred during serialization/deserialization or data processing. More on this in our Handling Exceptions documentation.
If you're getting the error message below when using the Java API Client, it could be that the underlying apache http client has been closed.:
com.algolia.search.exceptions.AlgoliaRuntimeException:
java.util.concurrent.CompletionException:
java.util.concurrent.CancellationException: Request execution cancelled
There are two workarounds you can try:
- Reinstantiate the client when an exception like
java.util.concurrent.CancellationException: Request execution cancelled
is thrown. - If you use Java 11, use
algoliasearch-java-net
instead.
If you didn’t close the client manually by mistake, most likely, an exception has occurred and caused the apache client to shut down (before you start getting CancellationException
).