{"record":{"id":"557f8a0d8cbd9abd","repo":"theforeman/foreman","slug":"unknown-interface-type-must-be-one-of-s","errorCode":null,"errorMessage":"Unknown interface type, must be one of [%s]","messagePattern":"Unknown interface type, must be one of \\[(.+?)\\]","errorType":"validation","errorClass":"InterfaceTypeMapper::UnknownTypeException","httpStatus":null,"severity":"error","filePath":"app/services/interface_type_mapper.rb","lineNumber":18,"sourceCode":"class InterfaceTypeMapper\n  class UnknownTypeException < Foreman::Exception; end\n\n  DEFAULT_TYPE = Nic::Managed\n  ALLOWED_TYPE_NAMES = Nic::Base.allowed_types.map { |t| t.humanized_name.downcase }\n  LEGACY_TYPE_NAMES = Nic::Base.allowed_types.map { |t| t.name }\n\n  def self.map(nic_type)\n    return DEFAULT_TYPE.name if nic_type.nil?\n\n    if ALLOWED_TYPE_NAMES.include? nic_type\n      # convert human readable name to the NIC's class name\n      Nic::Base.type_by_name(nic_type).to_s\n    elsif LEGACY_TYPE_NAMES.include? nic_type\n      # enable sending class names directly to keep backward compatibility\n      nic_type\n    else\n      raise UnknownTypeException.new(N_(\"Unknown interface type, must be one of [%s]\") % ALLOWED_TYPE_NAMES.join(', '))\n    end\n  end\nend\n","sourceCodeStart":1,"sourceCodeEnd":22,"githubUrl":"https://github.com/theforeman/foreman/blob/6b05625475cfe6aac31a88f8c8ee6e62e4efe620/app/services/interface_type_mapper.rb#L1-L22","documentation":"Error \"Unknown interface type, must be one of [%s]\" thrown in theforeman/foreman.","triggerScenarios":"Thrown at app/services/interface_type_mapper.rb:18 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":"6b05625475cfe6aac31a88f8c8ee6e62e4efe620","analyzedAt":"2026-08-23T17:46:34.094Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}