instructure/canvas-lms · error · GraphQL::ExecutionError
feature flag is disabled
Error message
feature flag is disabled
What it means
CreateInstitutionalTagCategory gates the mutation on the institutional_tags feature flag of the domain root account. When the flag is disabled it raises this GraphQL::ExecutionError before authorization or any model work. Same flag family as the CreateInstitutionalTag gate.
Solutions
- Enable institutional_tags on the root account via Account feature options or console (set_feature_flag!('institutional_tags', 'on')).
- Confirm context[:domain_root_account] is the flagged account.
- Check flag environment/site-level overrides that may disable it in that environment.
- Clear/refresh feature-flag caches if enabling appears not to take effect.
Example fix
// before
root_account.feature_enabled?(:institutional_tags) # => false
// after
Account.default.set_feature_flag!('institutional_tags', 'on') # then retry Defensive patterns
Strategy: validation
Validate before calling
# pre-flight raise 'flag disabled' unless root_account.feature_enabled?(:institutional_tags)
Type guard
function canCreateTagCategory(account) {
return Boolean(account && account.featureFlags && account.featureFlags.includes('institutional_tags'));
} Try / catch
try {
await createInstitutionalTagCategory({ variables })
} catch (e) {
if (e.message === 'feature flag is disabled') {
// show 'enable institutional tags' guidance instead of retrying
}
} Prevention
- Enable institutional_tags before testing category creation
- Check featureFlags in UI before rendering category-management screens
- Enable the flag on the domain root account (sub-account flags don't count)
- Keep flag state documented per environment
When it happens
Trigger: createInstitutionalTagCategory called on an account where feature_enabled?(:institutional_tags) is false — flag never enabled, environment without rollout, or wrong root account resolved in context.
Common situations: Local development without enabling the FF; calling on beta/production before rollout; multi-account setups where only some root accounts have the flag; flag rolled back by a release toggle.
Related errors
- category has reached the maximum number of tags
- feature flag is disabled
- feature flag is disabled
- Grading Assistance is not enabled for this course.
- peer_review_allocation_and_grading feature flag is not…
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/193f53be5c03af19.
Report an issue: GitHub.
Appendix: source
Thrown at app/graphql/mutations/create_institutional_tag_category.rb:32
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# NOTE: Depends on InstitutionalTagCategory model (app/models/institutional_tag_category.rb)
module Mutations
class CreateInstitutionalTagCategory < BaseMutation
argument :description, String, required: false
argument :name, String, required: true
field :institutional_tag_category, Types::InstitutionalTagCategoryType, 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.new(
name: input[:name],
description: input[:description]
)
if category.save
{ institutional_tag_category: category }
else
errors_for(category)
end
rescue ActiveRecord::RecordInvalid
errors_for(category)
rescue ActiveRecord::RecordNotFound
raise GraphQL::ExecutionError, "not found"
end
endView on GitHub (pinned to 1c9f0bb801)