{"record":{"id":"10ffcd5fbc7fdeac","repo":"fluent/fluentd","slug":"value-type-is-valid-only-for-hash-and-array-bu","errorCode":null,"errorMessage":":value_type is valid only for :hash and :array, but #{type}: #{name}","messagePattern":":value_type is valid only for :hash and :array, but #(.+?): #(.+?)","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/fluent/config/configure_proxy.rb","lineNumber":240,"sourceCode":"            # ignore\n          else\n            raise \"unknown type: #{type} for option #{key}\"\n          end\n        end\n      end\n\n      def config_parameter_option_validate!(name, type, **kwargs, &block)\n        if type.nil? && !block\n          type = :string\n        end\n        kwargs.each_key do |key|\n          case key\n          when :default, :alias, :secret, :skip_accessor, :deprecated, :obsoleted, :desc\n            # valid for all types\n          when :list\n            raise ArgumentError, \":list is valid only for :enum type, but #{type}: #{name}\" if type != :enum\n          when :value_type\n            raise ArgumentError, \":value_type is valid only for :hash and :array, but #{type}: #{name}\" if type != :hash && type != :array\n          when :symbolize_keys\n            raise ArgumentError, \":symbolize_keys is valid only for :hash, but #{type}: #{name}\" if type != :hash\n          else\n            raise ArgumentError, \"unknown option '#{key}' for configuration parameter: #{name}\"\n          end\n        end\n      end\n\n      def parameter_configuration(name, type = nil, **kwargs, &block)\n        config_parameter_option_validate!(name, type, **kwargs, &block)\n\n        name = name.to_sym\n\n        if block && type\n          raise ArgumentError, \"#{name}: both of block and type cannot be specified\"\n        elsif !block && !type\n          type = :string\n        end","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/config/configure_proxy.rb#L222-L258","documentation":"Error \":value_type is valid only for :hash and :array, but #{type}: #{name}\" thrown in fluent/fluentd.","triggerScenarios":"Thrown at lib/fluent/config/configure_proxy.rb:240 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":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}