{"record":{"id":"a7a39315edb7b64c","repo":"router-for-me/CLIProxyAPI","slug":"home-plugin-status-client-is-unavailable","errorCode":null,"errorMessage":"home plugin status client is unavailable","messagePattern":"home plugin status client is unavailable","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/home/plugin_status.go","lineNumber":24,"sourceCode":"\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/router-for-me/CLIProxyAPI/v7/internal/homeplugins\"\n)\n\nconst pluginStatusReportTimeout = 10 * time.Second\n\n// PluginStatusClient defines the interface for pushing plugin status reports.\ntype PluginStatusClient interface {\n\tRPushPluginStatus(ctx context.Context, payload []byte) error\n}\n\n// ReportPluginStatus marshals the given report, sets NodeID and UpdatedAt,\n// and pushes it to the provided client with a timeout.\nfunc ReportPluginStatus(ctx context.Context, client PluginStatusClient, nodeID string, report homeplugins.SyncReport) error {\n\tif client == nil {\n\t\treturn fmt.Errorf(\"home plugin status client is unavailable\")\n\t}\n\tnodeID = strings.TrimSpace(nodeID)\n\tif nodeID == \"\" {\n\t\treturn fmt.Errorf(\"home plugin status node id is empty\")\n\t}\n\treport.NodeID = nodeID\n\treport.UpdatedAt = time.Now().UTC()\n\traw, errMarshal := json.Marshal(report)\n\tif errMarshal != nil {\n\t\treturn errMarshal\n\t}\n\tif ctx == nil {\n\t\tctx = context.Background()\n\t}\n\treportCtx, cancel := context.WithTimeout(ctx, pluginStatusReportTimeout)\n\tdefer cancel()\n\treturn client.RPushPluginStatus(reportCtx, raw)\n}","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/home/plugin_status.go#L6-L42","documentation":"Error \"home plugin status client is unavailable\" thrown in router-for-me/CLIProxyAPI.","triggerScenarios":"Thrown at internal/home/plugin_status.go:24 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the home client is connected before querying plugin status.","Initialize the plugin status client after home cluster discovery completes."],"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-15T22:17:37.221Z"}