{"record":{"id":"aa065df86aba6516","repo":"instructure/canvas-lms","slug":"not-found","errorCode":null,"errorMessage":"Not Found","messagePattern":"Not Found","errorType":"exception","errorClass":"ActionController::RoutingError","httpStatus":404,"severity":"error","filePath":"app/controllers/application_controller.rb","lineNumber":3312,"sourceCode":"    common_courses = courses.map do |course|\n      course_json(course, current_user, session, [\"html_url\"], false).merge({\n                                                                              roles: common_courses[course.id].map { |role| Enrollment.readable_type(role) }\n                                                                            })\n    end\n\n    common_groups = groups.map do |group|\n      group_json(group, current_user, session, include: [\"html_url\"]).merge({\n                                                                              # in the future groups will have more roles and we'll need soemthing similar to\n                                                                              # the roles.map above in courses\n                                                                              roles: [t(\"#group.memeber\", \"Member\")]\n                                                                            })\n    end\n\n    common_courses + common_groups\n  end\n\n  def not_found\n    raise ActionController::RoutingError, \"Not Found\"\n  end\n\n  def set_js_rights(objtypes = nil)\n    objtypes ||= js_rights if respond_to?(:js_rights)\n    if objtypes\n      hash = {}\n      objtypes.each do |instance_symbol|\n        instance_name = instance_symbol.to_s\n        obj = instance_variable_get(:\"@#{instance_name}\")\n        policy = obj.check_policy(@current_user, session) unless obj.nil? || !obj.respond_to?(:check_policy)\n        hash[:\"#{instance_name.upcase}_RIGHTS\"] = ActiveSupport::HashWithIndifferentAccess[policy.map { |right| [right, true] }] unless policy.nil?\n      end\n\n      js_env hash\n    end\n  end\n\n  def set_js_wiki_data(opts = {})","sourceCodeStart":3294,"sourceCodeEnd":3330,"githubUrl":"https://github.com/instructure/canvas-lms/blob/1c9f0bb8013ed69c4f2efe11fd483025469b7e6c/app/controllers/application_controller.rb#L3294-L3330","documentation":"After passing argument validation, process_user_observer looks up the observer's pseudonym via @root_account.pseudonyms.active.find_by(sis_user_id: observer_id). If no active pseudonym with that sis_user_id exists on the root account, this ImportError is raised: the observer_id does not reference an existing, active user in this account.","triggerScenarios":"observer_id contains an SIS ID never imported on this root account; the observer's pseudonym was soft-deleted (inactive) or belongs to a different root account/subaccount; the ID differs by case or whitespace from the stored sis_user_id.","commonSituations":"Cross-account SIS imports where the observer was provisioned in another root account; observers deleted earlier in the same batch or previously via SIS; typos or stale IDs from a prior year's export; users whose integration_id was given instead of sis_user_id.","solutions":["Import the observer user first (users.csv) so an active pseudonym with that sis_user_id exists on the root account.","Verify the observer_id matches the pseudonym's sis_user_id exactly and is on the same root account.","Check the pseudonym was not deleted (workflow_state inactive); re-activate or re-import the user.","If the observer's user_id vs sis_user_id distinction is the issue, use the correct identifier."],"exampleFix":"// before: observer referenced before being imported\n# users.csv: (no OBS009 row)\n# user_observers.csv: STU001,OBS009,active  -> ImportError\n\n// after: import observer first\n# users.csv: OBS009,parent@example.com,Parent,active\n# user_observers.csv: STU001,OBS009,active","handlingStrategy":"validation","validationCode":"exists = root_account.pseudonyms.active.exists?(sis_user_id: observer_id)\nraise 'observer SIS ID not found on root account' unless exists","typeGuard":null,"tryCatchPattern":"begin\n  importer.process_user_observer(obs_id, stu_id, status)\nrescue SIS::Import::ImportError => e\n  logger.warn(\"observer #{obs_id} not found: #{e.message}\")\nend","preventionTips":["Order imports: users.csv before user_observers so referenced observers exist.","Ensure all users are imported on the same root account as the observer associations.","Verify IDs against sis_user_id exactly (not integration_id or login).","Check that prior batches did not soft-delete the observer's pseudonym."],"tags":["sis-import","ruby","record-not-found","pseudonym"],"backgroundTag":"record-not-found","analyzedSha":"1c9f0bb8013ed69c4f2efe11fd483025469b7e6c","analyzedAt":"2026-09-15T20:33:18.891Z","contentChangedAt":"2026-09-15T20:33:18.891Z","schemaVersion":2},"datasetVersion":"2026-09-23T02:17:17.105Z"}