{"record":{"id":"f7b1f6f80acce50f","repo":"portainer/portainer","slug":"chart-output-format-and-either-repo-or-registry-a","errorCode":null,"errorMessage":"chart, output format and either repo or registry are required","messagePattern":"chart, output format and either repo or registry are required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/libhelm/sdk/show.go","lineNumber":14,"sourceCode":"package sdk\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/pkg/errors\"\n\t\"github.com/portainer/portainer/pkg/libhelm/cache\"\n\t\"github.com/portainer/portainer/pkg/libhelm/options\"\n\t\"github.com/rs/zerolog/log\"\n\t\"helm.sh/helm/v4/pkg/action\"\n)\n\nvar errRequiredShowOptions = errors.New(\"chart, output format and either repo or registry are required\")\n\n// isSelfContainedOCIChartRef reports whether chart is a complete \"oci://host/path\"\n// reference that needs no separate repo or registry to be located (e.g. Portainer\n// addon charts, which are resolved from a bare oci:// ref with no Repo/Registry).\nfunc isSelfContainedOCIChartRef(chart string) bool {\n\treturn strings.HasPrefix(chart, \"oci://\")\n}\n\n// Show implements the HelmPackageManager interface by using the Helm SDK to show chart information.\n// It supports showing chart values, readme, and chart details based on the provided ShowOptions.\nfunc (hspm *HelmSDKPackageManager) Show(showOpts options.ShowOptions) ([]byte, error) {\n\tmissingSource := showOpts.Repo == \"\" && IsHTTPRepository(showOpts.Registry) && !isSelfContainedOCIChartRef(showOpts.Chart)\n\tif showOpts.Chart == \"\" || missingSource || showOpts.OutputFormat == \"\" {\n\t\tlog.Error().\n\t\t\tStr(\"context\", \"HelmClient\").\n\t\t\tStr(\"chart\", showOpts.Chart).\n\t\t\tStr(\"repo\", showOpts.Repo).\n\t\t\tStr(\"output_format\", string(showOpts.OutputFormat)).","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/portainer/portainer/blob/17e74456ff6e794b9d5439ec3fa06922aa18a3f8/pkg/libhelm/sdk/show.go#L1-L32","documentation":"Error \"chart, output format and either repo or registry are required\" thrown in portainer/portainer.","triggerScenarios":"Thrown at pkg/libhelm/sdk/show.go:14 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"17e74456ff6e794b9d5439ec3fa06922aa18a3f8","analyzedAt":"2026-08-26T23:09:01.915Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}