{"record":{"id":"fa1c2ae489dc3319","repo":"multica-ai/multica","slug":"list-private-plugins-w","errorCode":null,"errorMessage":"list Private Plugins: %w","messagePattern":"list Private Plugins: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_plugin.go","lineNumber":286,"sourceCode":"\treturn response.Plugins, nil\n}\n\nfunc printPluginRows(cmd *cobra.Command, plugins []map[string]any) error {\n\trows := make([][]string, 0, len(plugins))\n\tfor _, plugin := range plugins {\n\t\trows = append(rows, []string{\n\t\t\tstrVal(plugin, \"plugin_key\"), strVal(plugin, \"desired_version\"), strVal(plugin, \"lifecycle_status\"),\n\t\t\tstrVal(plugin, \"trust_tier\"), strVal(plugin, \"uploader_id\"),\n\t\t})\n\t}\n\tcli.PrintTable(cmd.OutOrStdout(), []string{\"PLUGIN\", \"VERSION\", \"STATUS\", \"TRUST\", \"UPLOADER\"}, rows)\n\treturn nil\n}\n\nfunc runPluginList(cmd *cobra.Command, _ []string) error {\n\tplugins, err := fetchPrivatePlugins(cmd)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"list Private Plugins: %w\", err)\n\t}\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"json\" {\n\t\treturn cli.PrintJSON(cmd.OutOrStdout(), plugins)\n\t}\n\treturn printPluginRows(cmd, plugins)\n}\n\nfunc runPluginStatus(cmd *cobra.Command, args []string) error {\n\tif len(args) == 1 {\n\t\tworkspaceID, err := pluginWorkspaceID(cmd)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tclient, err := newAPIClient(cmd)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}","sourceCodeStart":268,"sourceCodeEnd":304,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_plugin.go#L268-L304","documentation":"Wrap in runPluginList (cmd_plugin.go:286): `multica plugin list` failed while fetching the workspace's private plugins — either in workspace resolution (pluginWorkspaceID -> requireWorkspaceID or API lookup of the --workspace slug/prefix) or in the GET to /api/workspaces/{id}/plugins/private performed by fetchPrivatePlugins.","triggerScenarios":"No --workspace flag and no resolvable current workspace context; --workspace slug/prefix matches nothing or is ambiguous; GET returns 401/403/5xx; server unreachable.","commonSituations":"Fresh checkout with no workspace configured; workspace was deleted after the CLI stored its ID; typo in the slug; token from another workspace.","solutions":["Pass an explicit workspace: `multica plugin list --workspace <id-or-slug>`.","Verify the workspace exists: `multica workspace list` (or the /api/workspaces endpoint) and correct the stored/supplied value.","Re-login if auth is the wrapped cause; check server health for 5xx/connection errors."],"exampleFix":"// before\nmultica plugin list   // list Private Plugins: workspace \"mai\" is ambiguous\n\n// after\nmultica workspace list\nmultica plugin list --workspace main","handlingStrategy":"validation","validationCode":"if wsID == \"\" {\n    return fmt.Errorf(\"no workspace: pass --workspace or configure a default\")\n}","typeGuard":null,"tryCatchPattern":"if err := listCmd.Run(); err != nil {\n    if strings.Contains(err.Error(), \"list Private Plugins\") {\n        // check workspace resolution vs API failure via wrapped cause\n    }\n}","preventionTips":["Always pass --workspace explicitly in scripts.","Verify the workspace with `multica workspace list` after login and before plugin operations.","Re-login when tokens rotate; store the workspace ID alongside the token in automation secrets."],"tags":["cli","plugin","workspace","network","go"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}