{"record":{"id":"a044f5319651050c","repo":"crowdsecurity/crowdsec","slug":"unknown-parameter-s","errorCode":null,"errorMessage":"unknown parameter %s","messagePattern":"unknown parameter (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/acquisition/modules/file/config.go","lineNumber":198,"sourceCode":"\t\t\t\tlvl, err := log.ParseLevel(value[0])\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"unknown level %s: %w\", value[0], err)\n\t\t\t\t}\n\n\t\t\t\ts.logger.Logger.SetLevel(lvl)\n\t\t\tcase \"max_buffer_size\":\n\t\t\t\tif len(value) != 1 {\n\t\t\t\t\treturn errors.New(\"expected zero or one value for 'max_buffer_size'\")\n\t\t\t\t}\n\n\t\t\t\tmaxBufferSize, err := strconv.Atoi(value[0])\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"could not parse max_buffer_size %s: %w\", value[0], err)\n\t\t\t\t}\n\n\t\t\t\ts.config.MaxBufferSize = maxBufferSize\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"unknown parameter %s\", key)\n\t\t\t}\n\t\t}\n\t}\n\n\ts.config.Labels = labels\n\ts.config.Mode = configuration.CAT_MODE\n\ts.config.UniqueId = uuid\n\n\ts.logger.Debugf(\"Will try pattern %s\", args[0])\n\n\tfiles, err := filepath.Glob(args[0])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"glob failure: %w\", err)\n\t}\n\n\tif len(files) == 0 {\n\t\treturn fmt.Errorf(\"no matching files for pattern %s\", args[0])\n\t}","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/acquisition/modules/file/config.go#L180-L216","documentation":"ConfigureByDSN rejects any file:// DSN query parameter other than the supported ones (log_level, max_buffer_size). It is a strict-parameter guard: an unrecognized key in the DSN query string aborts configuration.","triggerScenarios":"Thrown at pkg/acquisition/modules/file/config.go:198 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the unsupported parameter from the file:// DSN","Use only supported parameters: log_level and max_buffer_size","Check documentation for the correct parameter name (e.g. misspelled key)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}