{"record":{"id":"b180f8ba427e1ab2","repo":"instructure/canvas-lms","slug":"contenttag-rlid-rlid-not-found","errorCode":null,"errorMessage":"ContentTag (rlid: #{rlid}) not found","messagePattern":"ContentTag \\(rlid: #(.+?)\\) not found","errorType":"exception","errorClass":"Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter","httpStatus":404,"severity":"error","filePath":"app/controllers/lti/ims/providers/memberships_provider.rb","lineNumber":184,"sourceCode":"    def validate_tool!\n      raise Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter unless resource_link\n\n      if assignment? && !assignment.external_tool?\n        raise Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter.new(\n          \"Assignment (id: #{assignment&.id}, rlid: #{rlid}) is not configured for submissions via external tool\",\n          api_message: \"Requested assignment not configured for external tool launches\"\n        )\n      end\n\n      tool_tag = assignment&.external_tool_tag || content_tag\n      if tool_tag.blank?\n        raise Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter.new(\n          \"ContentTag (rlid: #{rlid}) not found\",\n          api_message: \"Requested ResourceLink was not found\"\n        )\n      end\n      if tool_tag.content_type != \"ContextExternalTool\"\n        raise Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter.new(\n          \"ResourceLink (rlid: #{rlid}) needs content tag type 'ContextExternalTool' but found #{tool_tag.content_type}\",\n          api_message: \"Requested ResourceLink has an unexpected content type\"\n        )\n      end\n\n      unless tool.can_access_content_tag?(tool_tag)\n        raise Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter.new(\n          \"ResourceLink (rlid: #{rlid}) needs binding to external tool #{tool.id} but found #{tool_tag.content_id}\",\n          api_message: \"Requested ResourceLink bound to unexpected external tool\"\n        )\n      end\n    end\n\n    def course\n      raise \"Abstract Method\"\n    end\n\n    def course_rlid","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/instructure/canvas-lms/blob/1c9f0bb8013ed69c4f2efe11fd483025469b7e6c/app/controllers/lti/ims/providers/memberships_provider.rb#L166-L202","documentation":"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'.","triggerScenarios":"Thrown at app/controllers/lti/ims/providers/memberships_provider.rb:184 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the assignment/module item via the LTI tool so a ContentTag exists","Verify the rlid points to a resource link that actually has a content tag"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}