public Builder merge(
            OffsetDeleteResponseData newData
        ) {
            if (newData.errorCode() != Errors.NONE.code()) {
                // If the top-level error exists, we can discard it and use the new data.
                data = newData;
            } else if (data.topics().isEmpty()) {
                // If the current data is empty, we can discard it and use the new data.
                data = newData;
            } else {
                // Otherwise, we have to merge them together.
                newData.topics().forEach(newTopic -> {
                    OffsetDeleteResponseTopic existingTopic = data.topics().find(newTopic.name());
                    if (existingTopic == null) {
                        // If no topic exists, we can directly copy the new topic data.
                        data.topics().add(newTopic.duplicate());
                    } else {
                        // Otherwise, we add the partitions to the existing one. Note we
                        // expect non-overlapping partitions here as we don't verify
                        // if the partition is already in the list before adding it.
                        newTopic.partitions().forEach(partition ->
                            existingTopic.partitions().add(partition.duplicate())
                        );
                    }
                });
            }

            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