{"record":{"id":"90b690e53c766125","repo":"fluent/fluentd","slug":"bug-conf-must-be-a-element-hash-or-unspecified","errorCode":null,"errorMessage":"BUG: conf must be a Element, Hash (or unspecified), but '#{conf.class}'","messagePattern":"BUG: conf must be a Element, Hash \\(or unspecified\\), but '#(.+?)'","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/fluent/plugin_helper/storage.rb","lineNumber":67,"sourceCode":"                   raise Fluent::ConfigError, \"@type is required in <storage>\" unless conf['@type']\n                   conf['@type']\n                 elsif default_type\n                   default_type\n                 else\n                   raise ArgumentError, \"BUG: both type and conf are not specified\"\n                 end\n          storage = Plugin.new_storage(type, parent: self)\n          config = case conf\n                   when Fluent::Config::Element\n                     conf\n                   when Hash\n                     # in code, programmer may use symbols as keys, but Element needs strings\n                     conf = Hash[conf.map{|k,v| [k.to_s, v]}]\n                     Fluent::Config::Element.new('storage', usage, conf, [])\n                   when nil\n                     Fluent::Config::Element.new('storage', usage, {'@type' => type}, [])\n                   else\n                     raise ArgumentError, \"BUG: conf must be a Element, Hash (or unspecified), but '#{conf.class}'\"\n                   end\n          storage.configure(config)\n          if @_storages_started\n            storage.start\n          end\n          s = @_storages[usage] = StorageState.new(wrap_instance(storage), false)\n        end\n\n        s.storage\n      end\n\n      module StorageParams\n        include Fluent::Configurable\n        # minimum section definition to instantiate storage plugin instances\n        config_section :storage, required: false, multi: true, param_name: :storage_configs, init: true do\n          config_argument :usage, :string, default: ''\n          config_param    :@type, :string, default: Fluent::Plugin::Storage::DEFAULT_TYPE\n        end","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/plugin_helper/storage.rb#L49-L85","documentation":"Error \"BUG: conf must be a Element, Hash (or unspecified), but '#{conf.class}'\" thrown in fluent/fluentd.","triggerScenarios":"Thrown at lib/fluent/plugin_helper/storage.rb:67 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"}