instructure/canvas-lms · error · PeerReview::ParentOverrideNotFoundError
Parent assignment Section override not found for section
Error message
Parent assignment Section override not found for section %{section_id} What it means
PeerReview::ParentOverrideNotFoundError raised when validate_section_parent_override_exists cannot find the parent Section override for the given section_id. The peer-review flow requires a parent section override before creating per-section child overrides.
Solutions
- Run the parent override creation/sync for the course's sections before child creation
- Confirm section_id belongs to the assignment's course
- Create the missing parent Section override explicitly
- Check for deleted/failed parent-override records and re-create them
Example fix
// before PeerReview::CreateChildOverride.call(parent_override: nil, section_id: section.id) // after parent = PeerReview::EnsureSectionParentOverride.call(assignment:, section:) PeerReview::CreateChildOverride.call(parent_override: parent, section_id: section.id)
Defensive patterns
Strategy: validation
Validate before calling
parent = assignment.assignment_overrides.active.find_by(set_type: 'CourseSection', set_id: section_id) raise ArgumentError, 'missing parent section override' unless parent
Type guard
null
Try / catch
begin PeerReview::CreateChildOverride.call(parent_override:, section_id:) rescue PeerReview::ParentOverrideNotFoundError # create parent section override, then retry end
Prevention
- Create parent overrides for every section when enabling peer review
- Run parent provisioning when new sections are added
- Confirm the section belongs to the assignment's course
When it happens
Trigger: Creating a peer-review section child override when no parent override exists for that course_section_id — section added after parent generation, parent deleted, or wrong section id passed.
Common situations: New course sections created after initial override setup; section merged/deleted; sync job that creates parents failed or hasn't run; passing a section from a different course.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- Parent assignment ADHOC override not found for students
- Parent assignment Course override not found for course
- Parent assignment Group override not found for group
- Group does not exist
- Section does not exist
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/279f8461202377dc.
Report an issue: GitHub.
Appendix: source
Thrown at app/services/peer_review/validations.rb:265
end
def validate_course_parent_override_exists(parent_override, course_id)
unless parent_override.present?
raise PeerReview::ParentOverrideNotFoundError,
I18n.t("Parent assignment Course override not found for course %{course_id}", course_id:)
end
end
def validate_group_parent_override_exists(parent_override, group_id)
unless parent_override.present?
raise PeerReview::ParentOverrideNotFoundError,
I18n.t("Parent assignment Group override not found for group %{group_id}", group_id:)
end
end
def validate_section_parent_override_exists(parent_override, section_id)
unless parent_override.present?
raise PeerReview::ParentOverrideNotFoundError,
I18n.t("Parent assignment Section override not found for section %{section_id}", section_id:)
end
end
end
View on GitHub (pinned to 1c9f0bb801)