private void resetAndPropagateAssignmentWithError(ClassicGroup group, Errors error) {
        if (!group.isInState(COMPLETING_REBALANCE)) {
            throw new IllegalStateException("Group " + group.groupId() + " must be in " + COMPLETING_REBALANCE.name() +
                " state but is in " + group.currentState() + ".");
        }

        group.allMembers().forEach(member -> member.setAssignment(EMPTY_ASSIGNMENT));
        propagateAssignment(group, error);
    }
Reset assignment for all members and propagate the error to all members in the group.

@param group  The group.
@param error  The error to propagate.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java