private static boolean maybeHaltAndCompleteWaitingFuture(Throwable t, CompletableFuture<?> waitingFuture) {
        t = cause(t);
        if (!shouldHalt(t)) {
            return false;
        }
        waitingFuture.completeExceptionally(new IOException("No operations allowed on stream", t));
        return true;
    }
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