puppetlabs/puppet · error · Puppet::Error

Invalid argument '%{var}' at %{error_location}

Error message

Invalid argument '%{var}' at %{error_location}

What it means

Error "Invalid argument '%{var}' at %{error_location}" thrown in puppetlabs/puppet.

Source

Thrown at lib/puppet/util/network_device/config.rb:102

    @devices = devices
  end

  def parse_directive(device, var, value, count)
    case var
    when "type"
      device.provider = value
    when "url"
      begin
        URI.parse(value)
      rescue URI::InvalidURIError
        raise Puppet::Error, _("%{value} is an invalid url") % { value: value }
      end
      device.url = value
    when "debug"
      device.options[:debug] = true
    else
      error_location_str = Puppet::Util::Errors.error_location(nil, count)
      raise Puppet::Error, _("Invalid argument '%{var}' at %{error_location}") % { var: var, error_location: error_location_str }
    end
  end
end

View on GitHub (pinned to e227c27540)

When it happens

Trigger: Thrown at lib/puppet/util/network_device/config.rb:102 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21). Data as JSON: /api/errors/7aa102865b45cafb. Report an issue: GitHub.