instructure/canvas-lms · error · GraphQL::ExecutionError
cannot create non-collaborative groups when the…
Error message
cannot create non-collaborative groups when the differentiation tags feature flag is disabled
What it means
CreateGroupInSet#resolve raises this ExecutionError when input[:non_collaborative] is true but the owning account does not have allow_assign_to_differentiation_tags? enabled. Non-collaborative (differentiation tag) groups are only creatable while that account-level setting is on.
Solutions
- Enable allow_assign_to_differentiation_tags on the account (account settings / feature flag) if tag groups are desired.
- Otherwise omit non_collaborative (or pass false) to create a normal collaborative group.
- Check the account of the group set's context — the flag is evaluated on set.context.account, possibly a different account than expected.
- Gate the UI option on the account's differentiation-tags setting before offering it.
Example fix
// before
createGroupInSet({groupSetId, name, non_collaborative: true})
// after
if (account.allowAssignToDifferentiationTags) {
createGroupInSet({groupSetId, name, non_collaborative: true})
} else {
createGroupInSet({groupSetId, name, non_collaborative: false})
} Defensive patterns
Strategy: fallback
Validate before calling
if (nonCollaborative && !account.allowAssignToDifferentiationTags) {
warn('differentiation tags disabled; creating collaborative group instead')
} Type guard
const tagGroupsEnabled = (account) => account?.allowAssignToDifferentiationTags === true
Prevention
- Surface account feature-flag state to the client before rendering forms.
- Fall back to collaborative groups when the flag is off.
- Keep staging/prod flag states in sync or detect divergence at deploy.
When it happens
Trigger: createGroupInSet with non_collaborative: true against an account where the 'Assign to Differentiation Tags' feature flag / allow_assign_to_differentiation_tags setting is disabled.
Common situations: Client built against a staging account with the flag on, deployed against production with it off; flag recently disabled at the account or site-admin level while the UI still offers tag groups; sub-accounts inheriting a parent account's disabled setting.
Related errors
- cannot create collaborative groups in a non-collaborative…
- insufficient permissions to create non-collaborative groups
- custom gradebook statuses feature flag is disabled
- custom gradebook statuses feature flag is disabled
- custom gradebook statuses feature flag is disabled
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/a4bf973ca01145b8.
Report an issue: GitHub.
Appendix: source
Thrown at app/graphql/mutations/create_group_in_set.rb:40
graphql_name "CreateGroupInSet"
argument :group_set_id, ID, required: true, prepare: GraphQLHelpers.relay_or_legacy_id_prepare_func("GroupSet")
argument :name, String, required: true
argument :non_collaborative, Boolean, required: false, default_value: false
field :group, Types::GroupType, null: true
def resolve(input:)
category_id = GraphQLHelpers.parse_relay_or_legacy_id(input[:group_set_id], "GroupSet")
set = GroupCategory.find(category_id)
account = (set.context_type == "Account") ? set.context : set.context&.account
verify_authorized_action!(set.context, :manage_groups_add)
if input[:non_collaborative]
if account&.allow_assign_to_differentiation_tags?
raise GraphQL::ExecutionError, "insufficient permissions to create non-collaborative groups" unless set.context&.grants_right?(current_user, session, :manage_tags_add)
else
raise GraphQL::ExecutionError, "cannot create non-collaborative groups when the differentiation tags feature flag is disabled"
end
elsif set.non_collaborative
raise GraphQL::ExecutionError, "cannot create collaborative groups in a non-collaborative group set"
end
group = set.groups.build(name: input[:name], context: set.context, non_collaborative: input[:non_collaborative])
if group.save
{ group: }
else
errors_for(group)
end
rescue ActiveRecord::RecordNotFound
raise GraphQL::ExecutionError, "not found"
end
end
View on GitHub (pinned to 1c9f0bb801)