instructure/canvas-lms · error · InvalidSettingsError

Couldn't find valid settings for this link

Error message

Couldn't find valid settings for this link

What it means

ExternalToolsController raises InvalidSettingsError 'Couldn't find valid settings for this link' when the launch request cannot resolve valid LTI settings for the requested tool/link. invalid_settings_error is the central helper used whenever tool settings resolution fails.

Solutions

  1. Verify the external tool (id/url) is installed on the context account or course
  2. Check the tool's LTI settings include the requested URL / launch type
  3. Re-install or re-configure the tool with correct settings
  4. Confirm you're launching in the same context the tool was added to
Defensive patterns

Strategy: validation

Validate before calling

const tool = await getExternalTool(contextId, toolId); if (!tool || !tool.url && launchType === 'url') throw new Error('tool lacks configured launch settings');

Type guard

const isLaunchable = (t) => Boolean(t && (t.url || t.domain || t.lti_version));

Try / catch

try { await launch(toolId) } catch (e) { if (/Couldn't find valid settings/.test(e.message)) showToolConfigError(); else throw e; }

Prevention

When it happens

Trigger: LTI launch (basic_lti_launch_request or related actions) where the tool has no matching settings for the given id/url/resource link — e.g. wrong tool id, launch URL not configured in the tool, or launch_type not matching configured settings.

Common situations: Tool configured at wrong account level; URL-based launch where the tool has no url property; copied course with tool re-installed under a new id; LTI 1.1/1.3 configuration mismatch.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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

Appendix: source

Thrown at app/controllers/external_tools_controller.rb:787

      # If the resource_link doesn't have a url, then use the provided url to look up the tool
      tool = Lti::ToolFinder.from_url(provided_url, context, preferred_client_id: client_id, prefer_1_1:)
      unless tool
        invalid_settings_error
      end
      [tool, provided_url]
    elsif resource_link.url
      tool = resource_link.current_external_tool context
      unless tool
        invalid_settings_error
      end
      [tool, resource_link.url]
    else
      invalid_settings_error
    end
  end

  def invalid_settings_error
    raise InvalidSettingsError, t("#application.errors.invalid_external_tool", "Couldn't find valid settings for this link")
  end

  # @API Get a sessionless launch url for an external tool.
  # Returns a sessionless launch url for an external tool.
  # Prefers the resource_link_lookup_uuid, but defaults to the other passed
  #   parameters id, url, and launch_type
  #
  # NOTE: Either the resource_link_lookup_uuid, id, or url must be provided unless launch_type is assessment or module_item.
  #
  # @argument id [String]
  #   The external id of the tool to launch.
  #
  # @argument url [String]
  #   The LTI launch url for the external tool.
  #
  # @argument assignment_id [String]
  #   The assignment id for an assignment launch. Required if launch_type is set to "assessment".
  #

View on GitHub (pinned to 1c9f0bb801)