instructure/canvas-lms · error · GraphQL::ExecutionError
feature flag is disabled
Error message
feature flag is disabled
What it means
CreateInstitutionalTag checks the institutional_tags feature flag on the domain root account before doing anything. If the flag is off, it raises this GraphQL::ExecutionError. This is a deliberate gate: the institutional tagging feature is not enabled for the account, so the mutation must not run.
Solutions
- Enable the feature flag: rails console -> root_account.enable_feature!(:institutional_tags) or Account > Settings > Feature Options.
- Confirm context[:domain_root_account] is the account you enabled the flag on.
- Check flag definition (allowed/hidden, environment overrides in feature flags yml).
- If flag should already be on, verify no caching issue — restart or clear feature-flag caches.
Example fix
// before
root_account.feature_enabled?(:institutional_tags) # => false
// after (console)
Account.default.set_feature_flag!('institutional_tags', 'on') # then retry mutation Defensive patterns
Strategy: validation
Validate before calling
// client-side gate before the mutation call
if (!account.featureFlags.includes('institutional_tags')) {
throw new Error('institutional_tags feature flag is not enabled for this account');
} Type guard
function institutionalTagsEnabled(account) {
return Boolean(account && account.featureFlags && account.featureFlags.includes('institutional_tags'));
} Try / catch
try {
await createInstitutionalTag({ variables })
} catch (e) {
if (e.message === 'feature flag is disabled') {
// surface an admin-facing 'enable institutional tags' hint instead of retrying
}
} Prevention
- Enable the flag in every environment you test against
- Query an account featureFlags field before invoking gated mutations
- Keep flag rollout docs in sync between local, beta, and prod
- Remember the gate is on the domain root account, not sub-accounts
When it happens
Trigger: Calling createInstitutionalTag on any account where root_account.feature_enabled?(:institutional_tags) is false — typically staging/production accounts without the flag, or environments where the FF was never applied.
Common situations: Testing the new institutional-tags feature locally without enabling the flag; an environment (beta/prod) where the rollout has not happened; calling the mutation on a root account different from the one the flag was set on; feature flag later rolled back.
Related errors
- custom gradebook statuses feature flag is disabled
- feature flag is disabled
- Grading Assistance is not enabled for this course.
- Insufficient permissions
- Insufficient permissions
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/6fb6124036d19825.
Report an issue: GitHub.
Appendix: source
Thrown at app/graphql/mutations/create_institutional_tag.rb:36
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# NOTE: Depends on InstitutionalTag and InstitutionalTagCategory models
module Mutations
class CreateInstitutionalTag < BaseMutation
argument :category_id,
ID,
required: true,
prepare: GraphQLHelpers.relay_or_legacy_id_prepare_func("InstitutionalTagCategory")
argument :description, String, required: true
argument :name, String, required: true
field :institutional_tag, Types::InstitutionalTagType, null: true
def resolve(input:)
root_account = context[:domain_root_account]
raise GraphQL::ExecutionError, "feature flag is disabled" unless root_account.feature_enabled?(:institutional_tags)
raise GraphQL::ExecutionError, "not authorized" unless root_account.grants_right?(current_user, session, :manage_institutional_tags_create)
category = root_account.institutional_tag_categories.where(workflow_state: "active").find_by(id: input[:category_id])
raise GraphQL::ExecutionError, "not found" unless category
max_tags = DynamicSettings.find("institutional_tags")["max_tags_per_category", failsafe: nil]&.to_i || 50
if category.institutional_tags.where(workflow_state: "active").count >= max_tags
raise GraphQL::ExecutionError, "category has reached the maximum number of tags"
end
tag = category.institutional_tags.new(
name: input[:name],
description: input[:description],
root_account:
)
if tag.save
{ institutional_tag: tag }View on GitHub (pinned to 1c9f0bb801)