{"record":{"id":"f78cb25072320a78","repo":"router-for-me/CLIProxyAPI","slug":"home-kv-store-unavailable","errorCode":null,"errorMessage":"home kv store unavailable","messagePattern":"home kv store unavailable","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/home/kv_helpers.go","lineNumber":67,"sourceCode":"func KVSetJSONRequired(ctx context.Context, key string, value any, ttl time.Duration) (bool, error) {\n\traw, errMarshal := json.Marshal(value)\n\tif errMarshal != nil {\n\t\treturn false, errMarshal\n\t}\n\treturn KVSetBytesRequired(ctx, key, raw, ttl)\n}\n\nfunc KVSetBytesRequired(ctx context.Context, key string, value []byte, ttl time.Duration) (bool, error) {\n\tclient, homeMode, errClient := CurrentKVClient()\n\tif !homeMode || errClient != nil {\n\t\treturn homeMode, errClient\n\t}\n\twritten, errSet := client.KVSet(ctx, key, value, kvSetOptionsForTTL(ttl))\n\tif errSet != nil {\n\t\treturn true, errSet\n\t}\n\tif !written {\n\t\treturn true, fmt.Errorf(\"home kv store unavailable\")\n\t}\n\treturn true, nil\n}\n\nfunc KVSetNXRequired(ctx context.Context, key string, value []byte, ttl time.Duration) (bool, bool, error) {\n\tclient, homeMode, errClient := CurrentKVClient()\n\tif !homeMode || errClient != nil {\n\t\treturn homeMode, false, errClient\n\t}\n\twritten, errSet := client.KVSetNX(ctx, key, value, ttl)\n\treturn true, written, errSet\n}\n\nfunc KVDelRequired(ctx context.Context, keys ...string) (bool, int64, error) {\n\tclient, homeMode, errClient := CurrentKVClient()\n\tif !homeMode || errClient != nil {\n\t\treturn homeMode, 0, errClient\n\t}","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/home/kv_helpers.go#L49-L85","documentation":"Error \"home kv store unavailable\" thrown in router-for-me/CLIProxyAPI.","triggerScenarios":"Thrown at internal/home/kv_helpers.go:67 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the home cluster connection is established before accessing the KV store.","Retry once the home client has completed cluster discovery."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"78f0c4079e3e6273d65d03b5549cffc898703264","analyzedAt":"2026-08-15T12:26:37.444Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}