{"record":{"id":"c7c8ba4c93a7cb26","repo":"redis/go-redis","slug":"redis-invalid-s-boolean-expected-true-false-1-0","errorCode":null,"errorMessage":"redis: invalid %s boolean: expected true/false/1/0 or an empty string, got %q","messagePattern":"redis: invalid (.+?) boolean: expected true/false/1/0 or an empty string, got %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"options.go","lineNumber":895,"sourceCode":"\t\t\treturn -1\n\t\t}\n\t\treturn dur\n\t}\n\tif o.err == nil {\n\t\to.err = fmt.Errorf(\"redis: invalid %s duration: %w\", name, err)\n\t}\n\treturn 0\n}\n\nfunc (o *queryOptions) bool(name string) bool {\n\tswitch s := o.string(name); s {\n\tcase \"true\", \"1\":\n\t\treturn true\n\tcase \"false\", \"0\", \"\":\n\t\treturn false\n\tdefault:\n\t\tif o.err == nil {\n\t\t\to.err = fmt.Errorf(\"redis: invalid %s boolean: expected true/false/1/0 or an empty string, got %q\", name, s)\n\t\t}\n\t\treturn false\n\t}\n}\n\nfunc (o *queryOptions) remaining() []string {\n\tif len(o.q) == 0 {\n\t\treturn nil\n\t}\n\tkeys := slices.Collect(maps.Keys(o.q))\n\tslices.Sort(keys)\n\treturn keys\n}\n\n// setupConnParams converts query parameters in u to option value in o.\nfunc setupConnParams(u *url.URL, o *Options) (*Options, error) {\n\tq := queryOptions{q: u.Query()}\n","sourceCodeStart":877,"sourceCodeEnd":913,"githubUrl":"https://github.com/redis/go-redis/blob/c5cad058c72f58370553b48566302303cf8a2e89/options.go#L877-L913","documentation":"Error \"redis: invalid %s boolean: expected true/false/1/0 or an empty string, got %q\" thrown in redis/go-redis.","triggerScenarios":"Thrown at options.go:895 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":"c5cad058c72f58370553b48566302303cf8a2e89","analyzedAt":"2026-09-01T06:50:53.388Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}