instructure/canvas-lms · error · GraphQL::ExecutionError
Error posting assignment grades for sections
Error message
Error posting assignment grades for sections
What it means
Raised when Gradezilla#post_assignment_grades (invoked with the collected submission ids and posting params) returns falsy — i.e. the backend posting job/operation failed to start or report progress. It is a generic failure wrapper for the section-posting workflow, not a validation error.
Solutions
- Check whether any submissions in the scope are postable; if using graded_only, confirm graded submissions exist in the selected sections
- Inspect Rails/Progress logs for the failing post_assignment_grades call
- Retry the mutation after confirming assignment and submissions state
- If reproducible, report/investigate why assignment.post_assignment_grades returned falsy
Example fix
// before
postAssignmentGradesForSections(id, sectionIds, { gradedOnly: true }) // no graded submissions
// after
if (assignment.submissions.postable.exists?) {
postAssignmentGradesForSections(id, sectionIds, { gradedOnly: true })
} Defensive patterns
Strategy: retry
Validate before calling
const hasPostable = await assignment.submissions.postable.length > 0 if (gradedOnly && !hasPostable) skipMutation()
Type guard
null
Try / catch
try {
await postAssignmentGradesForSections({ id, sectionIds, gradedOnly })
} catch (e) {
if (e.message.includes('Error posting assignment grades')) {
logError(e); await delay(retryBackoff); retryOnce()
} else throw e
} Prevention
- Verify postable submissions exist in the selected sections before posting
- Avoid mutating assignment state concurrently with the post operation
- Monitor Progress records for failures after posting
- Check Rails logs for the underlying post_assignment_grades failure
When it happens
Trigger: post_assignment_grades returns nil/false, e.g. no matching postable submissions when graded_only is set, an internal failure creating the Progress, or a persistence error in the posting pipeline.
Common situations: Posting with graded_only: true when no graded submissions exist in the selected sections; transient DB errors; moderator workflow state changing between the scope build and the post call.
Related errors
- An unexpected error occurred while grading.
- An unexpected error occurred while submitting feedback.
- Error hiding assignment grades
- Error posting assignment grades
- and cannot be used together
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/c2e030752ca5b718.
Report an issue: GitHub.
Appendix: source
Thrown at app/graphql/mutations/post_assignment_grades_for_sections.rb:75
posting_params = {
graded_only: !!input[:graded_only],
section_names: sections&.pluck(:name)
}
if progress.save
progress.process_job(
assignment,
:post_submissions,
{ preserve_method_args: true, priority: Delayed::HIGH_PRIORITY },
progress:,
submission_ids: submissions_scope.pluck(:id),
posting_params:,
skip_content_participation_refresh: false
)
{ assignment:, progress:, sections: }
else
raise GraphQL::ExecutionError, "Error posting assignment grades for sections"
end
end
end
View on GitHub (pinned to 1c9f0bb801)