instructure/canvas-lms · error · GraphQL::ExecutionError
Assignment Grade Error
Error message
Assignment Grade Error
What it means
The inner block rescues Assignment::GradeError and converts it to a generic "Assignment Grade Error" GraphQL::ExecutionError. This is Canvas's internal grading failure — an error raised inside the grade/assess pipeline while persisting the grade or assessment artifact.
Solutions
- Check Canvas logs/production.stacktrace for the original Assignment::GradeError backtrace to find the real cause.
- Reload the submission and retry once; if the grade was already saved by another grader, skip.
- Validate rubric data (points, criterion ids) before calling the mutation.
Example fix
// before
rescue Assignment::GradeError
raise GraphQL::ExecutionError, 'Assignment Grade Error'
// after
rescue Assignment::GradeError => e
Rails.logger.error("GradeError in save_rubric_assessment: #{e.message}")
raise GraphQL::ExecutionError, "Assignment Grade Error: #{e.message}" Defensive patterns
Strategy: try-catch
Validate before calling
// validate rubric payload before assess
const totalPoints = criteria.reduce((sum, c) => sum + (c.points ?? 0), 0)
if (!criteria.length || Number.isNaN(totalPoints)) throw new Error('invalid rubric data') Try / catch
try { await saveRubricAssessment(...) } catch (e) { if (e.message === 'Assignment Grade Error') { logFullError(e); showError('Grading failed; reload and retry') } } Prevention
- Serialize grade saves per submission to avoid conflicts
- Keep rubric criterion ids/points in sync with the association
- Monitor server logs for the underlying Assignment::GradeError cause
When it happens
Trigger: association.assess or the surrounding grading flow raises Assignment::GradeError — e.g. grade conflicts, invalid grade state, or versioning failures during rubric assessment save.
Common situations: Grading a submission whose grade state changed concurrently (another grader saved first); inconsistent rubric_association points; versioned-submission edge cases.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- An unexpected error occurred while grading.
- e.message (Assignment::MaxGradersReachedError)
- Not authorized to assess user
- Rubric criteria not descriptive enough
- Rubric not found: #
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/3bab551580ec95f0.
Report an issue: GitHub.
Appendix: source
Thrown at app/graphql/mutations/save_rubric_assessment.rb:84
unless association.user_can_assess_for?(assessor: current_user, assessee: user, assessment_type:)
raise GraphQL::ExecutionError, "Not authorized to assess user"
end
rubric_assessment = association.assess(
assessor: current_user,
user:,
artifact: asset,
assessment: assessment_details,
graded_anonymously: input[:graded_anonymously]
)
submission.reload
return { submission:, rubric_assessment:, rubric_association: association }
end
rescue Assignment::MaxGradersReachedError => e
raise GraphQL::ExecutionError, e.message
rescue Assignment::GradeError
raise GraphQL::ExecutionError, "Assignment Grade Error"
end
rescue ActiveRecord::RecordNotFound => e
raise GraphQL::ExecutionError, "#{e.model} not found"
end
def ensure_adjudication_possible(provisional:, association_object:, grader:, &)
# Non-assignment association objects crash if they're passed into this
# controller, since find_asset_for_assessment only exists on assignments.
# The check here thus serves only to make sure the crash doesn't happen on
# the call below.
return yield unless association_object.is_a?(Assignment)
association_object.ensure_grader_can_adjudicate(
grader:,
provisional:,
occupy_slot: true,
&
)View on GitHub (pinned to 1c9f0bb801)