{"record":{"id":"d20d9919afc2464d","repo":"crowdsecurity/crowdsec","slug":"invalid-no-ready-check-in-dsn-w","errorCode":null,"errorMessage":"invalid no_ready_check in dsn: %w","messagePattern":"invalid no_ready_check in dsn: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/acquisition/modules/loki/config.go","lineNumber":211,"sourceCode":"\t\tl.Config.Limit = limit\n\t} else {\n\t\tl.Config.Limit = 5000 // max limit allowed by loki\n\t}\n\n\tif logLevel := params.Get(\"log_level\"); logLevel != \"\" {\n\t\tlevel, err := log.ParseLevel(logLevel)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid log_level in dsn: %w\", err)\n\t\t}\n\n\t\tl.Config.LogLevel = level\n\t\tl.logger.Logger.SetLevel(level)\n\t}\n\n\tif noReadyCheck := params.Get(\"no_ready_check\"); noReadyCheck != \"\" {\n\t\tnoReadyCheck, err := strconv.ParseBool(noReadyCheck)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid no_ready_check in dsn: %w\", err)\n\t\t}\n\n\t\tl.Config.NoReadyCheck = noReadyCheck\n\t}\n\n\tl.Config.URL = fmt.Sprintf(\"%s://%s\", scheme, u.Host)\n\tif u.User != nil {\n\t\tl.Config.Auth.Username = u.User.Username()\n\t\tl.Config.Auth.Password, _ = u.User.Password()\n\t}\n\n\tclientConfig := lokiclient.Config{\n\t\tLokiURL:  l.Config.URL,\n\t\tHeaders:  l.Config.Headers,\n\t\tLimit:    l.Config.Limit,\n\t\tQuery:    l.Config.Query,\n\t\tSince:    l.Config.Since,\n\t\tUsername: l.Config.Auth.Username,","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/acquisition/modules/loki/config.go#L193-L229","documentation":"ConfigureByDSN validates the optional 'no_ready_check' DSN boolean with strconv.ParseBool. Only 'true'/'false'/'1'/'0'/'t'/'f'/'T'/'F'/'TRUE'/'FALSE' style values are accepted; anything else triggers this error.","triggerScenarios":"A DSN like loki://host:3100/?no_ready_check=yes or no_ready_check=on is configured.","commonSituations":"Using YAML-style booleans ('yes'/'no') or 'enabled' in the URL query string.","solutions":["Use no_ready_check=true or no_ready_check=false in the DSN","Remove the parameter (the ready check runs by default)"],"exampleFix":"// before\nloki://localhost:3100/?no_ready_check=yes\n// after\nloki://localhost:3100/?no_ready_check=true","handlingStrategy":"validation","validationCode":"if v := params.Get(\"no_ready_check\"); v != \"\" {\n    if _, err := strconv.ParseBool(v); err != nil {\n        return fmt.Errorf(\"no_ready_check must be a Go-parseable bool (true/false/1/0/t/f)\")\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use true/false in URL query booleans","Remember query strings are not YAML — 'yes'/'on' are invalid"],"tags":["config","loki","boolean"],"backgroundTag":"invalid-config-value","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"}