{"record":{"id":"f2704e569332a1da","repo":"t8y2/dbx","slug":"invalid-hive-fetchsize-q-expected-a-positive-int-f2704e","errorCode":null,"errorMessage":"invalid Hive fetchSize %q: expected a positive integer","messagePattern":"invalid Hive fetchSize %q: expected a positive integer","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/config.go","lineNumber":588,"sourceCode":"\t\t\treturn fmt.Errorf(\"invalid Hive browserResponsePort %q: expected 0-65535\", value)\n\t\t}\n\t\tconfig.BrowserResponsePort = parsed\n\t}\n\tif value := parameter(values, \"browserresponsetimeout\"); value != \"\" {\n\t\tparsed, err := strconv.ParseInt(value, 10, 64)\n\t\tif err != nil || parsed <= 0 {\n\t\t\treturn fmt.Errorf(\"invalid Hive browserResponseTimeout %q: expected positive seconds\", value)\n\t\t}\n\t\tconfig.BrowserResponseTimeout = time.Duration(parsed) * time.Second\n\t}\n\tconfig.BrowserDisableSSLCheck = parameterBool(values, \"browserdisablesslcheck\")\n\tif strings.EqualFold(config.Auth, \"JWT\") && config.JWT == \"\" {\n\t\treturn errors.New(\"Hive JWT authentication requires jwt or the JWT environment variable\")\n\t}\n\tif value := parameter(values, \"fetchsize\"); value != \"\" {\n\t\tparsed, err := strconv.Atoi(value)\n\t\tif err != nil || parsed <= 0 {\n\t\t\treturn fmt.Errorf(\"invalid Hive fetchSize %q: expected a positive integer\", value)\n\t\t}\n\t\tconfig.FetchSize = parsed\n\t}\n\tif value := parameter(values, \"sockettimeout\"); value != \"\" {\n\t\tparsed, err := strconv.ParseInt(value, 10, 64)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid Hive socketTimeout %q: expected seconds\", value)\n\t\t}\n\t\tif parsed > 0 {\n\t\t\tconfig.SocketTimeout = time.Duration(parsed) * time.Second\n\t\t}\n\t}\n\tif value := parameter(values, \"thrift.client.max.message.size\"); value != \"\" {\n\t\tparsed, err := strconv.ParseInt(value, 10, 32)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid Hive thrift.client.max.message.size %q: expected bytes\", value)\n\t\t}\n\t\tif parsed > 0 {","sourceCodeStart":570,"sourceCodeEnd":606,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/config.go#L570-L606","documentation":"fetchSize controls row-chunk size for Hive fetches; the parameter must parse as an integer and be strictly positive. Atoi failure or values <= 0 produce this error during connection parameter validation.","triggerScenarios":"Connection string with fetchSize=0, fetchSize=-100, or non-numeric values like fetchSize=auto or fetchSize=1000 rows.","commonSituations":"Setting 0 expecting the driver default; placeholders like fetchSize=N in generated DSNs; pasting numbers with thousands separators (fetchSize=1,000).","solutions":["Set fetchSize to a positive integer (e.g. 1000)","Remove the parameter to use the driver's default fetch size","Strip separators/units from the value before assigning it","Validate numeric params from env/flags before building the DSN"],"exampleFix":"// before\ndsn := \"...;fetchSize=1,000\"\n// after\ndsn := \"...;fetchSize=1000\"","handlingStrategy":"validation","validationCode":"if v := params.Get(\"fetchSize\"); v != \"\" {\n    n, err := strconv.Atoi(v)\n    if err != nil || n <= 0 {\n        return fmt.Errorf(\"fetchSize %q must be a positive integer\", v)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := applyParams(values); err != nil {\n    if strings.Contains(err.Error(), \"fetchSize\") {\n        return fmt.Errorf(\"fetchSize must be a positive integer: %w\", err)\n    }\n    return err\n}","preventionTips":["Pass plain positive integers for fetchSize","Omit the parameter to accept the driver default","Sanitize numeric config from env/flags (strip commas/units) before building the DSN"],"tags":["hive","config","fetch-size","validation"],"backgroundTag":"invalid-parameter-value","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}