{"record":{"id":"df4a5acae3b1d715","repo":"portainer/portainer","slug":"invalid-tag-name","errorCode":null,"errorMessage":"invalid tag name","messagePattern":"invalid tag name","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"api/http/handler/tags/tag_create.go","lineNumber":20,"sourceCode":"\nimport (\n\t\"errors\"\n\t\"net/http\"\n\n\tportainer \"github.com/portainer/portainer/api\"\n\t\"github.com/portainer/portainer/api/dataservices\"\n\thttperror \"github.com/portainer/portainer/pkg/libhttp/error\"\n\t\"github.com/portainer/portainer/pkg/libhttp/request\"\n\t\"github.com/portainer/portainer/pkg/libhttp/response\"\n)\n\ntype tagCreatePayload struct {\n\tName string `validate:\"required\" example:\"org/acme\"`\n}\n\nfunc (payload *tagCreatePayload) Validate(r *http.Request) error {\n\tif len(payload.Name) == 0 {\n\t\treturn errors.New(\"invalid tag name\")\n\t}\n\n\treturn nil\n}\n\n// @id TagCreate\n// @summary Create a new tag\n// @description Create a new tag.\n// @description **Access policy**: administrator\n// @tags tags\n// @security ApiKeyAuth\n// @security jwt\n// @accept json\n// @produce json\n// @param body body tagCreatePayload true \"Tag details\"\n// @success 200 {object} portainer.Tag \"Success\"\n// @failure 409 \"This name is already associated to a tag\"\n// @failure 500 \"Server error\"","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/portainer/portainer/blob/17e74456ff6e794b9d5439ec3fa06922aa18a3f8/api/http/handler/tags/tag_create.go#L2-L38","documentation":"Error \"invalid tag name\" thrown in portainer/portainer.","triggerScenarios":"Thrown at api/http/handler/tags/tag_create.go:20 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"}