@Override
    public Map<Errors, Integer> errorCounts() {
        Map<Errors, Integer> counts = new HashMap<>();
        if (!groupLevelErrors.isEmpty()) {
            // built response with v8 or above
            for (Map.Entry<String, Errors> entry : groupLevelErrors.entrySet()) {
                updateErrorCounts(counts, entry.getValue());
            }
            for (OffsetFetchResponseGroup group : data.groups()) {
                group.topics().forEach(topic ->
                    topic.partitions().forEach(partition ->
                        updateErrorCounts(counts, Errors.forCode(partition.errorCode()))));
            }
        } else {
            // built response with v0-v7
            updateErrorCounts(counts, error);
            data.topics().forEach(topic ->
                topic.partitions().forEach(partition ->
                    updateErrorCounts(counts, Errors.forCode(partition.errorCode()))));
        }
        return counts;
    }
Constructor with throttle time for version 8 and above.
@param throttleTimeMs The time in milliseconds that this response was throttled
@param errors Potential coordinator or group level error code
@param responseData Fetched offset information grouped by topic-partition and by group
clients/src/main/java/org/apache/kafka/common/requests/OffsetFetchResponse.java