{"record":{"id":"47ffc96876f55cec","repo":"fluent/fluentd","slug":"name-e-message","errorCode":null,"errorMessage":"#{name}: #{e.message}","messagePattern":"#\\{name\\}: #\\{e\\.message\\}","errorType":"exception","errorClass":"ConfigError","httpStatus":null,"severity":"error","filePath":"lib/fluent/config/types.rb","lineNumber":144,"sourceCode":"      raise \"Plugin BUG: config type 'enum' requires :list of symbols\" unless list.is_a?(Array) && list.all?(Symbol)\n      unless list.include?(s)\n        raise ConfigError, \"valid options are #{list.join(',')} but got #{val}\"\n      end\n      s\n    end\n\n    ENUM_TYPE = Proc.new { |val, opts = {}, name = nil|\n      Config.enum_value(val, opts, name)\n    }\n\n    INTEGER_TYPE = Proc.new { |val, opts = {}, name = nil|\n      if val.nil?\n        nil\n      elsif opts[:strict]\n        begin\n          Integer(val)\n        rescue ArgumentError, TypeError => e\n          raise ConfigError, \"#{name}: #{e.message}\"\n        end\n      else\n        val.to_i\n      end\n    }\n\n    FLOAT_TYPE = Proc.new { |val, opts = {}, name = nil|\n      if val.nil?\n        nil\n      elsif opts[:strict]\n        begin\n          Float(val)\n        rescue ArgumentError, TypeError => e\n          raise ConfigError, \"#{name}: #{e.message}\"\n        end\n      else\n        val.to_f\n      end","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/config/types.rb#L126-L162","documentation":"Integer parameters parsed in strict mode (enabled by --strict-config-value or <system> strict_config_value true, applied via section.rb merging strict: true into the type opts) go through Kernel#Integer; an ArgumentError/TypeError is re-raised as Fluent::ConfigError prefixed with the parameter name. Without strict mode the value is coerced with to_i, which silently returns 0 for garbage, so this error specifically signals strict parsing is catching a malformed integer. Kernel#Integer accepts leading signs and 0x/0b/0o prefixes but not units, commas, or trailing characters.","triggerScenarios":"config_param :port, :integer with 'port 24224abc', 'port http', 'port 1,000', or 'port 10k' while strict mode is on; ENV placeholders expanding to non-numeric strings; quoted numbers with stray whitespace.","commonSituations":"Enabling strict config validation in CI or production hardening; copy-pasting sizes with units (1k, 1M) into an :integer param instead of :size; locale-style thousands separators; values that used to coerce to 0 silently now failing after enabling strict_config_value.","solutions":["Supply a plain decimal integer, optionally signed (e.g. 24224, -1)","Use the :size type for values with k/m/g/t units and the :time type for durations","Remove quotes, commas, units, and trailing characters from the value","If the value comes from an ENV variable, print/verify the expansion before the run"],"exampleFix":"# before (strict_config_value true)\n<source>\n  @type forward\n  port 24224,\n</source>\n\n# after\n<source>\n  @type forward\n  port 24224\n</source>","handlingStrategy":"validation","validationCode":"v = raw_value\nInteger(v) # raises ArgumentError now, before fluentd's configure does\n# if units are involved use the :size type instead of :integer","typeGuard":"def integer_config?(v) = v.is_a?(Integer) || (v.is_a?(String) && v.match?(/\\A[+-]?\\d+\\z/))","tryCatchPattern":"begin\n  Fluent::Config.integer_value(raw, { strict: true }, 'port')\nrescue Fluent::ConfigError => e\n  raise ConfigInvalid, \"port setting invalid: #{e.message}\"\nend","preventionTips":["Use :size for k/m/g values and :time for durations instead of raw :integer","Enable --strict-config-value in staging so coercion problems surface early","Validate ENV-injected numbers before starting fluentd"],"tags":["fluentd","config","integer","type-conversion","strict-mode"],"backgroundTag":"type-conversion-failed","analyzedSha":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}