{"record":{"id":"05253e12b82f27d9","repo":"GoogleContainerTools/skaffold","slug":"statuscode-deploy-helm-user-err","errorCode":"StatusCode_DEPLOY_HELM_USER_ERR","errorMessage":"errors.Wrap(err, prefix)","messagePattern":"errors\\.Wrap\\(err, prefix\\)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/helm/errors.go","lineNumber":72,"sourceCode":"\treturn sErrors.NewErrorWithStatusCode(\n\t\t&proto.ActionableErr{\n\t\t\tMessage: fmt.Sprintf(\"skaffold requires Helm version %s or greater\", minVer),\n\t\t\tErrCode: proto.StatusCode_DEPLOY_HELM_MIN_VERSION_ERR,\n\t\t\tSuggestions: []*proto.Suggestion{\n\t\t\t\t{\n\t\t\t\t\tSuggestionCode: proto.SuggestionCode_UPGRADE_HELM,\n\t\t\t\t\tAction:         fmt.Sprintf(\"Please upgrade helm to %s or higher via %s\", minVer, installLink),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n}\n\nfunc PluginErr(prefix string, err error) error {\n\treturn deployerr.UserError(errors.Wrap(err, prefix), proto.StatusCode_RENDER_HELM_PLUGIN_ERR)\n}\n\nfunc UserErr(prefix string, err error) error {\n\treturn deployerr.UserError(errors.Wrap(err, prefix), proto.StatusCode_DEPLOY_HELM_USER_ERR)\n}\n\nfunc CreateNamespaceErr(version string) error {\n\treturn sErrors.NewErrorWithStatusCode(\n\t\t&proto.ActionableErr{\n\t\t\tMessage: fmt.Sprintf(\"Skaffold config options `createNamespace` is not available in the current Helm version %s\", version),\n\t\t\tErrCode: proto.StatusCode_DEPLOY_HELM_CREATE_NS_NOT_AVAILABLE,\n\t\t\tSuggestions: []*proto.Suggestion{\n\t\t\t\t{\n\t\t\t\t\tSuggestionCode: proto.SuggestionCode_UPGRADE_HELM32,\n\t\t\t\t\tAction:         \"\\nPlease update Helm to version 3.2 or higher\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tSuggestionCode: proto.SuggestionCode_FIX_SKAFFOLD_CONFIG_HELM_CREATE_NAMESPACE,\n\t\t\t\t\tAction:         \"set `releases.createNamespace` to false and try again\",\n\t\t\t\t},\n\t\t\t},\n\t\t})","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/helm/errors.go#L54-L90","documentation":"helm.UserErr wraps helm-related failures attributable to the user's configuration or inputs with status code DEPLOY_HELM_USER_ERR. It is used broadly across the helm deployer (Dependencies, deployRelease, templateArgs, generateHelmManifest, generateSkaffoldOverrides) wherever a user-facing mistake causes the helm operation to fail.","triggerScenarios":"UserErr(prefix, err) fires when helm operations driven by user config fail: missing/invalid chart path, bad valuesFiles, invalid templated --set values, malformed generated manifest, failed dependencies build, or bad overrides JSON.","commonSituations":"Typo in `helmChart` path in skaffold.yaml; values file paths wrong or templating variables undefined; `releases[].set` values with unescaped commas; chart requiring a helm feature of a newer version; invalid namespace/release name characters.","solutions":["Read the wrapped message — skaffold prefixes it with the failing operation (templateArgs, generateHelmManifest, etc.)","Validate the chart: `helm lint <chart-path>` and `helm template <release> <chart-path> -f <values>`","Fix skaffold.yaml: verify helmChart path, valuesFiles existence, and release/namespace names (lowercase alphanumeric and `-`)","Reproduce the exact helm command with -vdebug output (`skaffold deploy -vdebug`) and run it manually","Quote/escape special characters (commas, braces) in `set` values"],"exampleFix":"// before (skaffold.yaml)\nhelm:\n  releases:\n    - name: My.Release\n      chartPath: ./charts/app\n// after\nhelm:\n  releases:\n    - name: my-release\n      chartPath: ./charts/app","handlingStrategy":"validation","validationCode":"func validateHelmRelease(r skaffoldHelmRelease) error {\n  if r.ChartPath == \"\" { return fmt.Errorf(\"helmChart path is required\") }\n  if _, err := os.Stat(r.ChartPath); err != nil { return fmt.Errorf(\"chart not found at %s\", r.ChartPath) }\n  var releaseNameRe = regexp.MustCompile(`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`)\n  if !releaseNameRe.MatchString(r.Name) { return fmt.Errorf(\"invalid release name %q\", r.Name) }\n  for _, vf := range r.ValuesFiles { if _, err := os.Stat(vf); err != nil { return fmt.Errorf(\"values file missing: %s\", vf) } }\n  return nil\n}","typeGuard":"null","tryCatchPattern":"if err := deploy(ctx); err != nil {\n  var uerr *deployerr.UserError\n  if errors.As(err, &uerr) && uerr.Code == proto.StatusCode_DEPLOY_HELM_USER_ERR {\n    return fmt.Errorf(\"helm config problem (check chart path/values/release name): %w\", errors.Unwrap(err))\n  }\n  return err\n}","preventionTips":["Run `helm lint` and `helm template` on the chart with the same values before deploying","Verify chartPath and valuesFiles exist relative to skaffold.yaml","Keep release/namespace names lowercase alphanumeric with dashes","Escape commas/braces in `set` values","Match helm version to chart API version requirements"],"tags":["helm","configuration","deploy","chart"],"backgroundTag":"helm-user-config-error","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}