public static UpdateFeaturesResponse createWithErrors(ApiError topLevelError, Map<String, ApiError> updateErrors, int throttleTimeMs) {
        final UpdatableFeatureResultCollection results = new UpdatableFeatureResultCollection();
        for (final Map.Entry<String, ApiError> updateError : updateErrors.entrySet()) {
            final String feature = updateError.getKey();
            final ApiError error = updateError.getValue();
            final UpdatableFeatureResult result = new UpdatableFeatureResult();
            result.setFeature(feature)
                .setErrorCode(error.error().code())
                .setErrorMessage(error.message());
            results.add(result);
        }
        final UpdateFeaturesResponseData responseData = new UpdateFeaturesResponseData()
            .setThrottleTimeMs(throttleTimeMs)
            .setErrorCode(topLevelError.error().code())
            .setErrorMessage(topLevelError.message())
            .setResults(results)
            .setThrottleTimeMs(throttleTimeMs);
        return new UpdateFeaturesResponse(responseData);
    }
Possible error codes:

  - {@link Errors#CLUSTER_AUTHORIZATION_FAILED}
  - {@link Errors#NOT_CONTROLLER}
  - {@link Errors#INVALID_REQUEST}
  - {@link Errors#FEATURE_UPDATE_FAILED}
clients/src/main/java/org/apache/kafka/common/requests/UpdateFeaturesResponse.java