{"record":{"id":"d534f7471d3c0087","repo":"t8y2/dbx","slug":"invalid-hive-sockettimeout-q-expected-seconds","errorCode":null,"errorMessage":"invalid Hive socketTimeout %q: expected seconds","messagePattern":"invalid Hive socketTimeout %q: expected seconds","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/argo-go/config.go","lineNumber":592,"sourceCode":"\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 {\n\t\t\tconfig.MaxMessageSize = int32(parsed)\n\t\t}\n\t}\n\tif value := parameter(values, \"retries\"); value != \"\" {\n\t\tparsed, err := strconv.Atoi(value)\n\t\tif err == nil && parsed > 0 {\n\t\t\tconfig.Retries = parsed","sourceCodeStart":574,"sourceCodeEnd":610,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/argo-go/config.go#L574-L610","documentation":"This error is returned when the Hive `sockettimeout` DSN parameter is present but not parseable by strconv.ParseInt as an integer number of seconds. The library expects a plain integer representing seconds, which it converts to a time.Duration. Non-integer strings like \"5s\", \"500ms\", or \"abc\" fail.","triggerScenarios":"Opening a Hive connection with sockettimeout=\"5s\", sockettimeout=\"500ms\", sockettimeout=\"\", or any non-integer value in the connection parameters.","commonSituations":"Developers copying Go duration-style values (\"10s\") from other drivers; confusion about the unit (seconds vs milliseconds); templated config producing an empty or quoted value.","solutions":["Set sockettimeout to a plain integer number of seconds, e.g. sockettimeout=30","Remove the sockettimeout parameter to use the driver default","Do not append unit suffixes like s/ms/h — the value is already seconds","Check that config templates render an unquoted integer"],"exampleFix":"// before\ndsn := \"hive://user:pass@host:10000/db?sockettimeout=30s\"\n// after\ndsn := \"hive://user:pass@host:10000/db?sockettimeout=30\"","handlingStrategy":"validation","validationCode":"func validateSocketTimeout(dsn string) error {\n\tvals, _ := url.ParseQuery(dsn)\n\tv := vals.Get(\"sockettimeout\")\n\tif v == \"\" { return nil }\n\tif _, err := strconv.ParseInt(v, 10, 64); err != nil {\n\t\treturn fmt.Errorf(\"sockettimeout must be integer seconds, got %q\", v)\n\t}\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":"if _, err := ParseConfig(dsn); err != nil && strings.Contains(err.Error(), \"socketTimeout\") {\n\treturn fmt.Errorf(\"sockettimeout must be plain seconds (e.g. 30, not 30s): %w\", err)\n}","preventionTips":["Never use Go duration strings (\"30s\") for this parameter — it is seconds only","Document the seconds unit next to the config key in your deployment templates","Validate DSN parameters in CI before rollout","Keep timeout units consistent across your driver configs"],"tags":["hive","config","timeout","connection-string"],"backgroundTag":"invalid-connection-string-parameter","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}