instructure/canvas-lms · error · GraphQL::ExecutionError

Error posting assignment grades

Error message

Error posting assignment grades

What it means

Catch-all failure branch of postAssignmentGrades: when the code path reaches the final else, the Gradebook posting service did not return a success result, so a generic 'Error posting assignment grades' ExecutionError is raised instead of a granular message.

Solutions

  1. Retry the mutation once; the failure is often transient during job processing.
  2. Check server logs (Canvas error reports) for the underlying exception raised by the posting service.
  3. Verify submissions exist and grades are in a postable state; contact admin/inspect progress jobs if it persists.

Example fix

// before
await postAssignmentGrades({input});
// after
try {
  await postAssignmentGrades({input});
} catch (e) {
  if (e.message === "Error posting assignment grades") {
    // retry once, then surface logs to the user
  }
}
Defensive patterns

Strategy: retry

Try / catch

try { await post(); } catch (e) { if (e.message === 'Error posting assignment grades') { await retryWithBackoff(post, 2); } else throw e; }

Prevention

When it happens

Trigger: The internal postgrades service returns a non-success result (e.g. internal submission posting failure) after passing earlier validations.

Common situations: Transient backend/data issues while enqueueing posting; unexpected return shape from the posting service during upgrades.

Related errors


AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15). Data as JSON: /api/errors/2b5a2a27ae8818df. Report an issue: GitHub.

Appendix: source

Thrown at app/graphql/mutations/post_assignment_grades.rb:84

    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:,
        posting_params:,
        skip_content_participation_refresh: false
      )
      { assignment:, progress:, sections: }
    else
      raise GraphQL::ExecutionError, "Error posting assignment grades"
    end
  end
end

View on GitHub (pinned to 1c9f0bb801)