code: private CompletableFuture<QueryResponse> queryForward(QueryRequest request) {
      if (context.getLeader() == null) {
        return CompletableFuture.completedFuture(logResponse(QueryResponse.builder()
          .withStatus(Response.Status.ERROR)
          .withError(CopycatError.Type.NO_LEADER_ERROR)
          .build()));
      }
  
      LOGGER.trace("{} - Forwarding {}", context.getCluster().member().address(), request);
      return this.<QueryRequest, QueryResponse>forward(request)
        .exceptionally(error -> QueryResponse.builder()
          .withStatus(Response.Status.ERROR)
          .withError(CopycatError.Type.NO_LEADER_ERROR)
          .build())
        .thenApply(this::logResponse);
    }
docs: Forwards the query to the leader.