fluent/fluentd · error · ArgumentError
#{name}: both of block and type cannot be specified
Error message
#{name}: both of block and type cannot be specified What it means
Error "#{name}: both of block and type cannot be specified" thrown in fluent/fluentd.
Source
Thrown at lib/fluent/config/configure_proxy.rb:255
when :list
raise ArgumentError, ":list is valid only for :enum type, but #{type}: #{name}" if type != :enum
when :value_type
raise ArgumentError, ":value_type is valid only for :hash and :array, but #{type}: #{name}" if type != :hash && type != :array
when :symbolize_keys
raise ArgumentError, ":symbolize_keys is valid only for :hash, but #{type}: #{name}" if type != :hash
else
raise ArgumentError, "unknown option '#{key}' for configuration parameter: #{name}"
end
end
end
def parameter_configuration(name, type = nil, **kwargs, &block)
config_parameter_option_validate!(name, type, **kwargs, &block)
name = name.to_sym
if block && type
raise ArgumentError, "#{name}: both of block and type cannot be specified"
elsif !block && !type
type = :string
end
opts = {}
opts[:type] = type
opts.merge!(kwargs)
begin
block ||= @type_lookup.call(type)
rescue ConfigError
# override error message
raise ArgumentError, "#{name}: unknown config_argument type `#{type}'"
end
# options for config_param
option_value_type!(name, opts, :desc, String)
option_value_type!(name, opts, :alias, Symbol)
option_value_type!(name, opts, :secret, type: :boolean)View on GitHub (pinned to dd45c6e18d)
When it happens
Trigger: Thrown at lib/fluent/config/configure_proxy.rb:255 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of fluent/fluentd@dd45c6e18d (2026-08-21).
Data as JSON: /api/errors/a00cdf9fd894f0b1.
Report an issue: GitHub.