theforeman/foreman · error · InterfaceTypeMapper::UnknownTypeException
Unknown interface type, must be one of [%s]
Error message
Unknown interface type, must be one of [%s]
What it means
Error "Unknown interface type, must be one of [%s]" thrown in theforeman/foreman.
Source
Thrown at app/services/interface_type_mapper.rb:18
class InterfaceTypeMapper
class UnknownTypeException < Foreman::Exception; end
DEFAULT_TYPE = Nic::Managed
ALLOWED_TYPE_NAMES = Nic::Base.allowed_types.map { |t| t.humanized_name.downcase }
LEGACY_TYPE_NAMES = Nic::Base.allowed_types.map { |t| t.name }
def self.map(nic_type)
return DEFAULT_TYPE.name if nic_type.nil?
if ALLOWED_TYPE_NAMES.include? nic_type
# convert human readable name to the NIC's class name
Nic::Base.type_by_name(nic_type).to_s
elsif LEGACY_TYPE_NAMES.include? nic_type
# enable sending class names directly to keep backward compatibility
nic_type
else
raise UnknownTypeException.new(N_("Unknown interface type, must be one of [%s]") % ALLOWED_TYPE_NAMES.join(', '))
end
end
end
View on GitHub (pinned to 6b05625475)
When it happens
Trigger: Thrown at app/services/interface_type_mapper.rb:18 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of theforeman/foreman@6b05625475 (2026-08-23).
Data as JSON: /api/errors/557f8a0d8cbd9abd.
Report an issue: GitHub.