instructure/canvas-lms · error · ActiveRecord::Rollback
Failed creating an event for the series, update not saved
Error message
Failed creating an event for the series, update not saved
What it means
Guard inside update_from_series: while growing a recurring series (the updated RRULE yields more occurrences than existing events), building and saving a new CalendarEvent occurrence failed (grant/save returned false). The transaction rolls back so no partial series is persisted.
Solutions
- Inspect the new event's errors for why creation failed (invalid params_for_update, duration, or context restrictions)
- Ensure the caller has permission to create events in the target context
- Retry with corrected series update params
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at app/controllers/calendar_events_api_controller.rb:1101 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/a16f8522902ad740.
Report an issue: GitHub.
Appendix: source
Thrown at app/controllers/calendar_events_api_controller.rb:1101
end
end
events = events.take(dtstart_list.length)
end
if new_series_head
events[0].series_head = true
end
dtstart_list.each_with_index do |dtstart, i|
params_for_update = set_series_params(params_for_update, dtstart, duration)
event = events[i]
event.update_all = true if which != "one" && event&.series_uuid && event.series_head
if event.nil?
event = target_event.context.calendar_events.build(params_for_update)
events << event
unless event.grants_any_right?(@current_user, session, :create)
error = { message: t("Failed creating an event for the series, update not saved"), status: :unauthorized }
raise ActiveRecord::Rollback
end
unless event.save
error = { message: t("Failed creating an event for the series, update not saved") }
raise ActiveRecord::Rollback
end
else
event.updating_user = @current_user
unless event.grants_any_right?(@current_user, session, :update)
error = { message: t("Failed updating an event in the series, update not saved"), status: :unauthorized }
raise ActiveRecord::Rollback
end
unless event.update(params_for_update)
error = { message: t("Failed updating an event in the series, update not saved") }
raise ActiveRecord::Rollback
end
endView on GitHub (pinned to 1c9f0bb801)