{"record":{"id":"05cd14d185a55855","repo":"puppetlabs/puppet","slug":"error-loading-ssl-custom-oids-mapping-file-from-05cd14","errorCode":null,"errorMessage":"Error loading ssl custom OIDs mapping file from '%{custom_oid_file}': no such index '%{map_key}'","messagePattern":"Error loading ssl custom OIDs mapping file from '%(.+?)': no such index '%(.+?)'","errorType":"exception","errorClass":"Puppet::Error","httpStatus":null,"severity":"error","filePath":"lib/puppet/ssl/oids.rb","lineNumber":119,"sourceCode":"  # ---\n  # oid_mapping:\n  #  '1.3.6.1.4.1.34380.1.2.1.1':\n  #    shortname : 'myshortname'\n  #    longname  : 'Long name'\n  #  '1.3.6.1.4.1.34380.1.2.1.2':\n  #    shortname: 'myothershortname'\n  #    longname: 'Other Long name'\n  def self.parse_custom_oid_file(custom_oid_file, map_key = 'oid_mapping')\n    if File.exist?(custom_oid_file) && File.readable?(custom_oid_file)\n      mapping = nil\n      begin\n        mapping = Puppet::Util::Yaml.safe_load_file(custom_oid_file, [Symbol])\n      rescue => err\n        raise Puppet::Error, _(\"Error loading ssl custom OIDs mapping file from '%{custom_oid_file}': %{err}\") % { custom_oid_file: custom_oid_file, err: err }, err.backtrace\n      end\n\n      unless mapping.has_key?(map_key)\n        raise Puppet::Error, _(\"Error loading ssl custom OIDs mapping file from '%{custom_oid_file}': no such index '%{map_key}'\") % { custom_oid_file: custom_oid_file, map_key: map_key }\n      end\n\n      unless mapping[map_key].is_a?(Hash)\n        raise Puppet::Error, _(\"Error loading ssl custom OIDs mapping file from '%{custom_oid_file}': data under index '%{map_key}' must be a Hash\") % { custom_oid_file: custom_oid_file, map_key: map_key }\n      end\n\n      oid_defns = []\n      mapping[map_key].keys.each do |oid|\n        shortname, longname = mapping[map_key][oid].values_at(\"shortname\", \"longname\")\n        if shortname.nil? || longname.nil?\n          raise Puppet::Error, _(\"Error loading ssl custom OIDs mapping file from '%{custom_oid_file}': incomplete definition of oid '%{oid}'\") % { custom_oid_file: custom_oid_file, oid: oid }\n        end\n\n        oid_defns << [oid, shortname, longname]\n      end\n\n      oid_defns\n    end","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/ssl/oids.rb#L101-L137","documentation":"Error \"Error loading ssl custom OIDs mapping file from '%{custom_oid_file}': no such index '%{map_key}'\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/ssl/oids.rb:119 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"}