private ApiError invalidMetadataVersion(short version, String message) {
        String errorMessage = String.format("Invalid metadata.version %d. %s", version, message);
        log.warn(errorMessage);
        return new ApiError(Errors.INVALID_UPDATE_VERSION, errorMessage);
    }
Perform some additional validation for metadata.version updates.
metadata/src/main/java/org/apache/kafka/controller/FeatureControlManager.java