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

Error importing outcomes

Error message

Error importing outcomes

What it means

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.

Solutions

  1. Check logs for the outcome import job/Progress records around the failure time for the underlying cause
  2. Verify the outcome ids being imported are valid and belong to an accessible source group
  3. Confirm delayed_job / background workers are running and the content migration service (if used) is healthy
  4. Retry the mutation after fixing the underlying import failure
Defensive patterns

Strategy: try-catch

Validate before calling

// ensure source outcomes and target group are valid before importing
const src = await client.query({ query: OUTCOME_LINKS, variables: { groupId: sourceGroupId } });
if (!src.data?.group?.outcomeLinks?.length) throw new Error('nothing to import');

Try / catch

try {
  const res = await client.mutate({ mutation: IMPORT_OUTCOMES, variables: { input } });
} catch (e) {
  if (e.message.includes('Error importing outcomes')) {
    // inspect backend logs for the import job failure and retry after fixing
  }
}

Prevention

When it happens

Trigger: 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.

Common situations: Underlying OutcomeImport creation failing silently (bad outcome ids, target group state), background job infrastructure issues, or content migration service failures in the environment.

Related errors


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

Appendix: source

Thrown at app/graphql/mutations/import_outcomes.rb:375

    target_context = target_group.context
    progress = target_context.progresses.new(tag: "import_outcomes", user: current_user)

    if progress.save
      progress.process_job(
        self.class,
        :execute,
        {
          strand: "import_outcomes_#{target_context.class.name.downcase}_#{target_context.id}_#{context[:domain_root_account].global_id}"
        },
        source_context,
        group,
        outcome_id,
        target_group
      )

      { progress: }
    else
      raise GraphQL::ExecutionError, I18n.t("Error importing outcomes")
    end
  end
end

View on GitHub (pinned to 1c9f0bb801)