{"record":{"id":"1fc3bdcc411a7cbc","repo":"puppetlabs/puppet","slug":"unknown-resource-type-type","errorCode":null,"errorMessage":"Unknown resource type: '%{type}'","messagePattern":"Unknown resource type: '%(.+?)'","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/puppet/pops/evaluator/runtime3_resource_support.rb","lineNumber":31,"sourceCode":"    if type_name.is_a?(String) && type_name.casecmp(CLASS_STRING) == 0\n      # Resolve a 'class' and its titles\n      resource_titles = resource_titles.collect do |a_title|\n        hostclass = env.known_resource_types.find_hostclass(a_title)\n        hostclass ? hostclass.name : a_title\n      end\n      # resolved type is just the string CLASS\n      resolved_type = CLASS_STRING\n    else\n      # resolve a resource type - pcore based, ruby impl or user defined\n      resolved_type = find_resource_type(scope, type_name)\n    end\n\n    # TODO: Unknown resource causes creation of Resource to fail with ArgumentError, should give\n    # a proper Issue. Now the result is \"Error while evaluating a Resource Statement\" with the message\n    # from the raised exception. (It may be good enough).\n    unless resolved_type\n      # TODO: do this the right way\n      raise ArgumentError, _(\"Unknown resource type: '%{type}'\") % { type: type_name }\n    end\n\n    # Build a resource for each title - use the resolved *type* as opposed to a reference\n    # as this makes the created resource retain the type instance.\n    #\n    resource_titles.map do |resource_title|\n      resource = Puppet::Parser::Resource.new(\n        resolved_type, resource_title,\n        :parameters => evaluated_parameters,\n        :file => file,\n        :line => line,\n        :kind => Puppet::Resource.to_kind(resolved_type),\n        :exported => exported,\n        :virtual => virtual,\n        # WTF is this? Which source is this? The file? The name of the context ?\n        :source => scope.source,\n        :scope => scope,\n        :strict => true","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/evaluator/runtime3_resource_support.rb#L13-L49","documentation":"Error \"Unknown resource type: '%{type}'\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/pops/evaluator/runtime3_resource_support.rb:31 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}