public <P> Builder addPartitions(
            String topicName,
            List<P> partitions,
            Function<P, Integer> partitionIndex,
            Errors error
        ) {
            final OffsetDeleteResponseTopic topicResponse = getOrCreateTopic(topicName);
            partitions.forEach(partition ->
                topicResponse.partitions().add(new OffsetDeleteResponsePartition()
                    .setPartitionIndex(partitionIndex.apply(partition))
                    .setErrorCode(error.code()))
            );
            return this;
        }
Possible error codes:

- Partition errors:
  - {@link Errors#GROUP_SUBSCRIBED_TO_TOPIC}
  - {@link Errors#TOPIC_AUTHORIZATION_FAILED}
  - {@link Errors#UNKNOWN_TOPIC_OR_PARTITION}

- Group or coordinator errors:
  - {@link Errors#COORDINATOR_LOAD_IN_PROGRESS}
  - {@link Errors#COORDINATOR_NOT_AVAILABLE}
  - {@link Errors#NOT_COORDINATOR}
  - {@link Errors#GROUP_AUTHORIZATION_FAILED}
  - {@link Errors#INVALID_GROUP_ID}
  - {@link Errors#GROUP_ID_NOT_FOUND}
  - {@link Errors#NON_EMPTY_GROUP}
clients/src/main/java/org/apache/kafka/common/requests/OffsetDeleteResponse.java