instructure/canvas-lms · error · GraphQL::ExecutionError
custom gradebook statuses feature flag is disabled
Error message
custom gradebook statuses feature flag is disabled
What it means
GraphQL::ExecutionError raised in Mutations::DeleteCustomGradeStatus#resolve when the site-admin feature flag custom_gradebook_statuses is not enabled. The mutation refuses to run entirely unless Account.site_admin has that flag on.
Solutions
- Enable the custom_gradebook_statuses feature flag on the site admin account
- Confirm you are on the intended environment/site where the flag is on
- If the feature is not meant to be used, remove the client code calling this mutation
- Check via Rails console: Account.site_admin.feature_enabled?(:custom_gradebook_statuses)
Example fix
// before
mutation { deleteCustomGradeStatus(id: "5") { customGradeStatusId } } # flag off
// after
# Rails console
Account.site_admin.set_feature_flag!('custom_gradebook_statuses', 'on') Defensive patterns
Strategy: validation
Validate before calling
const enabled = await fetchFeatureFlag('site_admin', 'custom_gradebook_statuses')
if (!enabled) throw new Error('custom gradebook statuses disabled') Try / catch
try {
await deleteCustomGradeStatus(id)
} catch (e) {
if (/feature flag is disabled/.test(e.message)) disableFeatureUI()
} Prevention
- Sync feature-flag state to the client
- Verify flag state via Rails console before rollout
- Keep staging/production flag configs in sync
When it happens
Trigger: Calling deleteCustomGradeStatus in any account/site where Account.site_admin.feature_enabled?(:custom_gradebook_statuses) is false.
Common situations: Self-hosted or regional Canvas installs where the flag was never enabled; environments where the flag was recently turned off; staging vs production flag divergence.
Related errors
- custom gradebook statuses feature flag is disabled
- cannot create non-collaborative groups when the…
- custom grade status not found
- 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/5621a07027b7a01d.
Report an issue: GitHub.
Appendix: source
Thrown at app/graphql/mutations/delete_custom_grade_status.rb:26
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# 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/>.
#
module Mutations
class DeleteCustomGradeStatus < BaseMutation
argument :id, ID, required: true
field :custom_grade_status_id, ID, null: true
def resolve(input:)
raise GraphQL::ExecutionError, "custom gradebook statuses feature flag is disabled" unless Account.site_admin.feature_enabled?(:custom_gradebook_statuses)
custom_grade_status = CustomGradeStatus.active.find(input[:id])
unless custom_grade_status.grants_right?(current_user, session, :delete)
raise GraphQL::ExecutionError, I18n.t("Insufficient permissions")
end
context[:deleted_models] ||= {}
context[:deleted_models][:custom_grade_status] = custom_grade_status
custom_grade_status_id = custom_grade_status.id
custom_grade_status.deleted_by = current_user
custom_grade_status.destroy
InstStatsd::Statsd.distributed_increment("custom_grade_status.graphql.delete")
{ custom_grade_status_id: }
rescue ActiveRecord::RecordNotFound
raise GraphQL::ExecutionError, "custom grade status not found"View on GitHub (pinned to 1c9f0bb801)