synchronized void resetStateOnResponseError(ApiKeys api, Errors error, boolean shouldResetMemberId) {
        final String reason = String.format("encountered %s from %s response", error, api);
        resetStateAndRejoin(reason, shouldResetMemberId);
    }
Get the current generation state if the group is stable, otherwise return null

@return the current generation or null
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java