public ApiVersionsResponse build() {
            final ApiVersionsResponseData data = new ApiVersionsResponseData();
            data.setErrorCode(error.code());
            data.setApiKeys(Objects.requireNonNull(apiVersions));
            data.setThrottleTimeMs(throttleTimeMs);
            data.setSupportedFeatures(
                maybeFilterSupportedFeatureKeys(Objects.requireNonNull(supportedFeatures), alterFeatureLevel0));
            data.setFinalizedFeatures(
                createFinalizedFeatureKeys(Objects.requireNonNull(finalizedFeatures)));
            data.setFinalizedFeaturesEpoch(finalizedFeaturesEpoch);
            data.setZkMigrationReady(zkMigrationEnabled);
            return new ApiVersionsResponse(data);
        }
Possible error codes:
- {@link Errors#UNSUPPORTED_VERSION}
- {@link Errors#INVALID_REQUEST}
clients/src/main/java/org/apache/kafka/common/requests/ApiVersionsResponse.java