static <K> Throwable getSubLevelError(Map<K, Errors> subLevelErrors, K subKey, String keyNotFoundMsg) {
        if (!subLevelErrors.containsKey(subKey)) {
            return new IllegalArgumentException(keyNotFoundMsg);
        } else {
            return subLevelErrors.get(subKey).exception();
        }
    }
Get a sub level error when the request is in batch. If given key was not found,
return an {@link IllegalArgumentException}.
clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java