{"record":{"id":"76b13bb5944d3240","repo":"mongodb/mongoid","slug":"unknown-config-options-detected-config","errorCode":null,"errorMessage":"Unknown config options detected: #{config}.","messagePattern":"Unknown config options detected: #(.+?)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/mongoid/clients/factory.rb","lineNumber":68,"sourceCode":"      #\n      # @example Create the client.\n      #   Factory.create_client(config)\n      #\n      # @param [ Hash ] configuration The client config.\n      #\n      # @return [ Mongo::Client ] The client.\n      def create_client(configuration)\n        raise Errors::NoClientsConfig.new unless configuration\n\n        config = configuration.dup\n        uri = config.delete(:uri)\n        database = config.delete(:database) || Mongo::URI.get(uri).database\n        hosts = config.delete(:hosts)\n        opts = config.delete(:options) || {}\n        if opts.key?(:auto_encryption_options)\n          opts[:auto_encryption_options] = build_auto_encryption_options(opts, database)\n        end\n        default_logger.warn(\"Unknown config options detected: #{config}.\") unless config.empty?\n        if uri\n          Mongo::Client.new(uri, options(opts))\n        else\n          Mongo::Client.new(\n            hosts,\n            options(opts).merge(database: database)\n          )\n        end\n      end\n\n      # Build auto encryption options for the client based on the options\n      # provided in the Mongoid client configuration and the encryption\n      # schema map for the database.\n      #\n      # @param [ Hash ] opts Options from the Mongoid client configuration.\n      # @param [ String ] database Database name to use for encryption schema map.\n      #\n      # @return [ Hash | nil ] Auto encryption options for the client.","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/mongodb/mongoid/blob/0da0e23d71adfbad31128c18e5e2c8c301c6f7c4/lib/mongoid/clients/factory.rb#L50-L86","documentation":"Error \"Unknown config options detected: #{config}.\" thrown in mongodb/mongoid.","triggerScenarios":"Thrown at lib/mongoid/clients/factory.rb:68 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":"0da0e23d71adfbad31128c18e5e2c8c301c6f7c4","analyzedAt":"2026-08-23T06:25:47.656Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}