{"record":{"id":"1818ab3b46a07634","repo":"redis/go-redis","slug":"redis-invalid-s-number-s","errorCode":null,"errorMessage":"redis: invalid %s number: %s","messagePattern":"redis: invalid (.+?) number: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"options.go","lineNumber":855,"sourceCode":"}\n\nfunc (o *queryOptions) strings(name string) []string {\n\tvs := o.q[name]\n\tdelete(o.q, name)\n\treturn vs\n}\n\nfunc (o *queryOptions) int(name string) int {\n\ts := o.string(name)\n\tif s == \"\" {\n\t\treturn 0\n\t}\n\ti, err := strconv.Atoi(s)\n\tif err == nil {\n\t\treturn i\n\t}\n\tif o.err == nil {\n\t\to.err = fmt.Errorf(\"redis: invalid %s number: %s\", name, err)\n\t}\n\treturn 0\n}\n\nfunc (o *queryOptions) duration(name string) time.Duration {\n\ts := o.string(name)\n\tif s == \"\" {\n\t\treturn 0\n\t}\n\t// try plain number first\n\tif i, err := strconv.Atoi(s); err == nil {\n\t\tif i <= 0 {\n\t\t\t// disable timeouts\n\t\t\treturn -1\n\t\t}\n\t\treturn time.Duration(i) * time.Second\n\t}\n\tdur, err := time.ParseDuration(s)","sourceCodeStart":837,"sourceCodeEnd":873,"githubUrl":"https://github.com/redis/go-redis/blob/c5cad058c72f58370553b48566302303cf8a2e89/options.go#L837-L873","documentation":"Error \"redis: invalid %s number: %s\" thrown in redis/go-redis.","triggerScenarios":"Thrown at options.go:855 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"}