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
SetOverrideStatus requires the custom_gradebook_statuses feature flag to be enabled on the site-admin account. resolve raises immediately if Account.site_admin.feature_enabled?(:custom_gradebook_statuses) is false — the mutation is entirely gated on this flag.
Solutions
- Enable the flag: in a Rails console run Account.site_admin.enable_feature! :custom_gradebook_statuses, or via Site Admin > Feature Options in the UI
- Upgrade to a Canvas version where the flag exists/enabled by default if it is absent
- Remove or gate the client call behind the same flag check
Example fix
// before customGradeStatus(enrollmentId: 12, customGradeStatusId: 3) // after // only when Account.site_admin.feature_enabled?(:custom_gradebook_statuses) Account.site_admin.enable_feature! :custom_gradebook_statuses customGradeStatus(enrollmentId: 12, customGradeStatusId: 3)
Defensive patterns
Strategy: validation
Validate before calling
// Ruby flag_on = Account.site_admin.feature_enabled?(:custom_gradebook_statuses)
Try / catch
// Ruby
begin
mutation
rescue GraphQL::ExecutionError => e
disable_custom_status_ui if e.message.include?("feature flag is disabled")
end Prevention
- Check the flag in Site Admin > Feature Options before shipping UI that calls this mutation
- Gate client code behind the same flag query returned via the API
- Keep environments' flag settings in sync to avoid test/prod divergence
When it happens
Trigger: Any setOverrideStatus mutation call while the custom_gradebook_statuses feature flag is off for site admin, regardless of arguments.
Common situations: Self-hosted or new Canvas instance where the flag was never enabled; flag was recently turned off after a rollout decision; testing against an environment with default flags.
Related errors
- custom gradebook statuses feature flag is disabled
- # not found
- enhanced_rubrics, rubric_self_assesment and…
- feature flag is disabled
- feature flag is disabled
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/2cde42fa01a2231f.
Report an issue: GitHub.
Appendix: source
Thrown at app/graphql/mutations/set_override_status.rb:28
# 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 SetOverrideStatus < BaseMutation
argument :custom_grade_status_id, ID, required: false, default_value: nil
argument :enrollment_id, ID, required: true
argument :grading_period_id, ID, required: false, default_value: nil
field :grades, Types::GradesType, null: true
def resolve(input:)
raise GraphQL::ExecutionError, "custom gradebook statuses feature flag is disabled" unless Account.site_admin.feature_enabled?(:custom_gradebook_statuses)
score = score(input:)
unless score.grants_right?(current_user, session, :update_custom_status)
raise GraphQL::ExecutionError, I18n.t("Insufficient permissions")
end
enrollment = Enrollment.find_by(id: input[:enrollment_id])
custom_grade_status = get_custom_grade_status(input:)
grading_period_id = input[:grading_period_id]
updated_score = enrollment.update_override_status(custom_grade_status:, grading_period_id:)
InstStatsd::Statsd.distributed_increment("custom_grade_status.applied_to.final_grade")
{ grades: updated_score }
rescue ActiveRecord::RecordNotFound => e
raise GraphQL::ExecutionError, "#{e.model} not found"
rescue ActiveRecord::RecordInvalid => e
errors_for(e.record)
endView on GitHub (pinned to 1c9f0bb801)