@Override
        public CompletableFuture<Void> trim(long newStartOffset) {
            CompletableFuture<Void> cf = new CompletableFuture<>();
            trim0(newStartOffset, cf);
            return cf;
        }
Maybe halt and complete the waiting future if the exception is a ElasticStreamClientException with a halt error code.

@param t             the exception
@param waitingFuture the waiting future
@return true if the waiting future is completed, otherwise false
core/src/main/scala/kafka/log/streamaspect/ClientWrapper.java