instructure/canvas-lms · error · Canvas::Migration::Error
A partner ID is required to use Academic Benchmarks
Error message
A partner ID is required to use Academic Benchmarks
What it means
Canvas::Migration::Error raised in Converter#export when no archive file is supplied and neither a settings partner_id nor a plugin-configured partner ID (AcademicBenchmark.ensure_partner_id) is available. The Academic Benchmarks API requires a partner ID to authenticate.
Solutions
- Configure the plugin: Account site-admin plugin settings for academic_benchmark (partner_id) or AcademicBenchmark.config in the console.
- Pass partner_id in the converter settings for this import.
- Provide an archive_file of standards data so the API path (and partner id) is not needed.
- Check config presence first: AcademicBenchmark.config&.dig(:partner_id).
Example fix
// before
converter = AcademicBenchmark::Converter.new({ content_migration: cm, guid: g })
converter.export
// after
converter = AcademicBenchmark::Converter.new({ content_migration: cm, guid: g, partner_id: ENV['AB_PARTNER_ID'] })
converter.export Defensive patterns
Strategy: validation
Validate before calling
unless settings[:archive_file] || settings[:partner_id].present? || AcademicBenchmark.config&.dig(:partner_id) raise 'configure partner_id or provide an archive file' end
Try / catch
begin
converter.export
rescue Canvas::Migration::Error => e
Rails.logger.error("AB config problem: #{e.message}")
end Prevention
- Configure plugin settings during environment provisioning.
- Store partner_id in plugin settings, not ad-hoc ENV vars.
- Prefer shipping an archive file when API credentials aren't available.
When it happens
Trigger: Exporting standards by GUID/authority (no archive_file) with @partner_id blank and AcademicBenchmark.config[:partner_id] nil (plugin not configured).
Common situations: Fresh Canvas installs where the academic_benchmark plugin settings were never filled in; partner_id typo'd or stored in the wrong plugin setting; pulling standards from the API in an environment missing config.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- A partner key is required to use Academic Benchmarks
- partner_id & partner_key are required
- an object with an interface for loading settings must be…
- an object with an interface for loading settings must be…
- authorization_code_not_supplied
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/704877c9df1e7eb3.
Report an issue: GitHub.
Appendix: source
Thrown at gems/plugins/academic_benchmark/lib/academic_benchmark/converter.rb:43
super(settings, "academic_benchmark")
@ratings_overrides = settings[:migration_options] || {}
@course[:learning_outcomes] = []
@partner_id = settings[:partner_id]
@partner_key = settings[:partner_key]
end
def export
unless content_migration
raise Canvas::Migration::Error,
"Missing required content_migration settings"
end
unless Account.site_admin.grants_right?(content_migration.user, :manage_global_outcomes)
raise Canvas::Migration::Error,
"User isn't allowed to edit global outcomes"
end
unless @archive_file
unless @partner_id.present? || AcademicBenchmark.ensure_partner_id.nil?
raise Canvas::Migration::Error, I18n.t("A partner ID is required to use Academic Benchmarks")
end
unless @partner_key.present? || AcademicBenchmark.ensure_partner_key.nil?
raise Canvas::Migration::Error, I18n.t("A partner key is required to use Academic Benchmarks")
end
end
if outcome_data.present?
if outcome_data.instance_of? AcademicBenchmarks::Standards::StandardsForest
outcome_data.trees.each do |t|
@course[:learning_outcomes] << t.root.build_outcomes(@ratings_overrides)
end
else
@course[:learning_outcomes] << outcome_data.root.build_outcomes(@ratings_overrides)
end
end
save_to_file
@course
end
View on GitHub (pinned to 1c9f0bb801)