{"record":{"id":"325ccc29ceb5b3af","repo":"benbjohnson/litestream","slug":"unknown-config-key-s","errorCode":null,"errorMessage":"unknown config key: %s","messagePattern":"unknown config key: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vfs_config.go","lineNumber":92,"sourceCode":"\tcase \"hydration_enabled\":\n\t\tb := strings.ToLower(value) == \"true\" || value == \"1\"\n\t\tcfg.HydrationEnabled = &b\n\tcase \"hydration_path\":\n\t\tcfg.HydrationPath = value\n\tcase \"poll_interval\":\n\t\td, err := time.ParseDuration(value)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid poll_interval: %w\", err)\n\t\t}\n\t\tcfg.PollInterval = &d\n\tcase \"cache_size\":\n\t\tn, err := strconv.Atoi(value)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid cache_size: %w\", err)\n\t\t}\n\t\tcfg.CacheSize = &n\n\tdefault:\n\t\treturn fmt.Errorf(\"unknown config key: %s\", key)\n\t}\n\treturn nil\n}\n\nfunc ParseVFSURIConfig(uriParameters map[string]string) (*VFSConfig, error) {\n\tif len(uriParameters) == 0 {\n\t\treturn nil, nil\n\t}\n\n\tcfg := &VFSConfig{}\n\tvar found bool\n\tfor _, key := range vfsURIConfigKeys {\n\t\tvalue, ok := uriParameters[key]\n\t\tif !ok {\n\t\t\tcontinue\n\t\t}\n\t\tif err := cfg.Set(key, value); err != nil {\n\t\t\treturn nil, err","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/benbjohnson/litestream/blob/4ed7a308f6271ebfd2b0a6e4b70b03011a37e4a3/vfs_config.go#L74-L110","documentation":"VFSConfig.Set only accepts a fixed set of keys (write_enabled, sync_interval, buffer_path, hydration_enabled, hydration_path, poll_interval, cache_size, etc.). Any other key hits the default branch and is rejected, preventing silent typos in VFS URI parameters.","triggerScenarios":"Calling Set(<key>, <value>) — typically via ParseVFSURIConfig on URI query parameters — with a key outside the supported set, e.g. sync_interval misspelled as syncinterval, or an unrelated param left in the URI.","commonSituations":"Typo'd parameter names in the litestream VFS URI; parameters copied from a different driver's URI; stale options removed in a newer litestream version.","solutions":["Check the supported key list and fix the spelling (e.g. sync_interval not syncinterval)","Remove unsupported parameters from the VFS URI","Consult the litestream VFS docs for the current version — option names change between releases"],"exampleFix":"// before\nlitestream://file:///db?syncinterval=10s\n// after\nlitestream://file:///db?sync_interval=10s","handlingStrategy":"validation","validationCode":"var allowed = map[string]bool{\"write_enabled\":true,\"sync_interval\":true,\"buffer_path\":true,\"hydration_enabled\":true,\"hydration_path\":true,\"poll_interval\":true,\"cache_size\":true}\nfor k := range uriParams {\n    if !allowed[k] { return fmt.Errorf(\"unsupported VFS param %q\", k) }\n}","typeGuard":null,"tryCatchPattern":"if err := cfg.Set(k, v); err != nil {\n    if strings.Contains(err.Error(), \"unknown config key\") {\n        // list supported keys and fix the parameter name\n    }\n}","preventionTips":["Keep a canonical list of supported VFS URI parameters in your tooling","Validate URIs against the litestream version in use before deployment","Watch changelogs for renamed or removed VFS options"],"tags":["go","config","uri","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"4ed7a308f6271ebfd2b0a6e4b70b03011a37e4a3","analyzedAt":"2026-09-06T18:29:25.564Z","contentChangedAt":"2026-09-06T18:29:25.564Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}