{"record":{"id":"e34e4953c766efd2","repo":"goharbor/harbor","slug":"bad-request-e34e49","errorCode":"BAD_REQUEST","errorMessage":"invalid input: %s","messagePattern":"invalid input: (.+?)","errorType":"validation","errorClass":"*errors.Error","httpStatus":400,"severity":"error","filePath":"src/server/v2.0/handler/artifact.go","lineNumber":214,"sourceCode":"\tdstRepo := fmt.Sprintf(\"%s/%s\", params.ProjectName, params.RepositoryName)\n\t_, _, err = a.repoCtl.Ensure(ctx, dstRepo)\n\tif err != nil {\n\t\treturn a.SendError(ctx, err)\n\t}\n\n\t_, err = a.artCtl.Copy(ctx, srcRepo, ref, dstRepo)\n\tif err != nil {\n\t\treturn a.SendError(ctx, err)\n\t}\n\tlocation := strings.TrimSuffix(params.HTTPRequest.URL.Path, \"/\") + \"/\" + ref\n\treturn operation.NewCopyArtifactCreated().WithLocation(location)\n}\n\n// parse \"repository:tag\" or \"repository@digest\" into repository and reference parts\nfunc parse(s string) (string, string, error) {\n\tmatches := reference.ReferenceRegexp.FindStringSubmatch(s)\n\tif matches == nil {\n\t\treturn \"\", \"\", errors.New(nil).WithCode(errors.BadRequestCode).\n\t\t\tWithMessagef(\"invalid input: %s\", s)\n\t}\n\trepository := matches[1]\n\treference := matches[2]\n\tif matches[3] != \"\" {\n\t\t_, err := digest.Parse(matches[3])\n\t\tif err != nil {\n\t\t\treturn \"\", \"\", errors.New(nil).WithCode(errors.BadRequestCode).\n\t\t\t\tWithMessagef(\"invalid input: %s\", s)\n\t\t}\n\t\treference = matches[3]\n\t}\n\treturn repository, reference, nil\n}\n\nfunc (a *artifactAPI) CreateTag(ctx context.Context, params operation.CreateTagParams) middleware.Responder {\n\tif err := a.RequireProjectAccess(ctx, params.ProjectName, rbac.ActionCreate, rbac.ResourceTag); err != nil {\n\t\treturn a.SendError(ctx, err)","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/server/v2.0/handler/artifact.go#L196-L232","documentation":"Error \"invalid input: %s\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/server/v2.0/handler/artifact.go:214 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":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}