{"record":{"id":"a6945fee1a23f1df","repo":"instructure/canvas-lms","slug":"error-importing-outcomes","errorCode":null,"errorMessage":"Error importing outcomes","messagePattern":"Error importing outcomes","errorType":"exception","errorClass":"GraphQL::ExecutionError","httpStatus":null,"severity":"error","filePath":"app/graphql/mutations/import_outcomes.rb","lineNumber":375,"sourceCode":"    target_context = target_group.context\n    progress = target_context.progresses.new(tag: \"import_outcomes\", user: current_user)\n\n    if progress.save\n      progress.process_job(\n        self.class,\n        :execute,\n        {\n          strand: \"import_outcomes_#{target_context.class.name.downcase}_#{target_context.id}_#{context[:domain_root_account].global_id}\"\n        },\n        source_context,\n        group,\n        outcome_id,\n        target_group\n      )\n\n      { progress: }\n    else\n      raise GraphQL::ExecutionError, I18n.t(\"Error importing outcomes\")\n    end\n  end\nend\n","sourceCodeStart":357,"sourceCodeEnd":379,"githubUrl":"https://github.com/instructure/canvas-lms/blob/1c9f0bb8013ed69c4f2efe11fd483025469b7e6c/app/graphql/mutations/import_outcomes.rb#L357-L379","documentation":"In ImportOutcomes#process_job, after enqueueing the outcome import, a guard checks whether the import setup succeeded; if the expected state is not reached it raises this generic ExecutionError instead of returning a progress object.","triggerScenarios":"process_job reaching the else branch — i.e. the import job/state was not successfully created or advanced after calling the import helper, so resolve cannot return a Progress.","commonSituations":"Underlying OutcomeImport creation failing silently (bad outcome ids, target group state), background job infrastructure issues, or content migration service failures in the environment.","solutions":["Check logs for the outcome import job/Progress records around the failure time for the underlying cause","Verify the outcome ids being imported are valid and belong to an accessible source group","Confirm delayed_job / background workers are running and the content migration service (if used) is healthy","Retry the mutation after fixing the underlying import failure"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// ensure source outcomes and target group are valid before importing\nconst src = await client.query({ query: OUTCOME_LINKS, variables: { groupId: sourceGroupId } });\nif (!src.data?.group?.outcomeLinks?.length) throw new Error('nothing to import');","typeGuard":null,"tryCatchPattern":"try {\n  const res = await client.mutate({ mutation: IMPORT_OUTCOMES, variables: { input } });\n} catch (e) {\n  if (e.message.includes('Error importing outcomes')) {\n    // inspect backend logs for the import job failure and retry after fixing\n  }\n}","preventionTips":["Monitor delayed_job workers and import Progress records for health","Validate outcome ids and target group state before the call","Surface backend logs, since this message hides the root cause"],"tags":["graphql","outcomes","import","job"],"backgroundTag":"api-error-response","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"}