{"record":{"id":"47307d86950dcf23","repo":"portainer/portainer","slug":"invalid-custom-template-title-47307d","errorCode":null,"errorMessage":"Invalid custom template title","messagePattern":"Invalid custom template title","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"api/http/handler/customtemplates/customtemplate_update.go","lineNumber":70,"sourceCode":"\t// Deprecated: use SourceID instead. Password used in basic authentication or token used in token authentication. Required when RepositoryAuthentication is true.\n\tRepositoryPassword string `example:\"myGitPassword\"`\n\t// Path to the Stack file inside the Git repository\n\tComposeFilePathInRepository string `example:\"docker-compose.yml\" default:\"docker-compose.yml\"`\n\t// Content of stack file\n\tFileContent string `validate:\"required\"`\n\t// Definitions of variables in the stack file\n\tVariables []portainer.CustomTemplateVariableDefinition\n\t// Deprecated: use SourceID instead. TLSSkipVerify skips SSL verification when cloning the Git repository.\n\tTLSSkipVerify bool `example:\"false\"`\n\t// IsComposeFormat indicates if the Kubernetes template is created from a Docker Compose file\n\tIsComposeFormat bool `example:\"false\"`\n\t// EdgeTemplate indicates if this template purpose for Edge Stack\n\tEdgeTemplate bool `example:\"false\"`\n}\n\nfunc (payload *customTemplateUpdatePayload) Validate(r *http.Request) error {\n\tif len(payload.Title) == 0 {\n\t\treturn errors.New(\"Invalid custom template title\")\n\t}\n\n\tif payload.Type != portainer.KubernetesStack && payload.Platform != portainer.CustomTemplatePlatformLinux && payload.Platform != portainer.CustomTemplatePlatformWindows {\n\t\treturn errors.New(\"Invalid custom template platform\")\n\t}\n\n\tif payload.Type != portainer.KubernetesStack && payload.Type != portainer.DockerSwarmStack && payload.Type != portainer.DockerComposeStack {\n\t\treturn errors.New(\"Invalid custom template type\")\n\t}\n\n\tif len(payload.Description) == 0 {\n\t\treturn errors.New(\"Invalid custom template description\")\n\t}\n\n\tif !IsValidNote(payload.Note) {\n\t\treturn errors.New(\"Invalid note. <img> tag is not supported\")\n\t}\n","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/portainer/portainer/blob/17e74456ff6e794b9d5439ec3fa06922aa18a3f8/api/http/handler/customtemplates/customtemplate_update.go#L52-L88","documentation":"Error \"Invalid custom template title\" thrown in portainer/portainer.","triggerScenarios":"Thrown at api/http/handler/customtemplates/customtemplate_update.go:70 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"}