instructure/canvas-lms · error · Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter

ContentTag (rlid: # ) not found

Error message

ContentTag (rlid: #{rlid}) not found

What it means

Guard in MembershipsProvider#validate_tool!: no ContentTag backs the requested resource link (assignment has no external_tool_tag and no context content_tag exists), so InvalidResourceLinkIdFilter is raised with api_message 'Requested ResourceLink was not found'.

Solutions

  1. Create the assignment/module item via the LTI tool so a ContentTag exists
  2. Verify the rlid points to a resource link that actually has a content tag
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at app/controllers/lti/ims/providers/memberships_provider.rb:184 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at app/controllers/lti/ims/providers/memberships_provider.rb:184

    def validate_tool!
      raise Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter unless resource_link

      if assignment? && !assignment.external_tool?
        raise Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter.new(
          "Assignment (id: #{assignment&.id}, rlid: #{rlid}) is not configured for submissions via external tool",
          api_message: "Requested assignment not configured for external tool launches"
        )
      end

      tool_tag = assignment&.external_tool_tag || content_tag
      if tool_tag.blank?
        raise Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter.new(
          "ContentTag (rlid: #{rlid}) not found",
          api_message: "Requested ResourceLink was not found"
        )
      end
      if tool_tag.content_type != "ContextExternalTool"
        raise Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter.new(
          "ResourceLink (rlid: #{rlid}) needs content tag type 'ContextExternalTool' but found #{tool_tag.content_type}",
          api_message: "Requested ResourceLink has an unexpected content type"
        )
      end

      unless tool.can_access_content_tag?(tool_tag)
        raise Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter.new(
          "ResourceLink (rlid: #{rlid}) needs binding to external tool #{tool.id} but found #{tool_tag.content_id}",
          api_message: "Requested ResourceLink bound to unexpected external tool"
        )
      end
    end

    def course
      raise "Abstract Method"
    end

    def course_rlid

View on GitHub (pinned to 1c9f0bb801)