{"record":{"id":"97ee1aff5139da70","repo":"goharbor/harbor","slug":"invalid-config-item-not-defined-in-metadatalist","errorCode":null,"errorMessage":"invalid config, item not defined in metadatalist, %v","messagePattern":"invalid config, item not defined in metadatalist, (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/config/manager.go","lineNumber":194,"sourceCode":"\t}\n}\n\n// UpdateConfig - Update config Store with a specified configuration and also save updated configure.\nfunc (c *CfgManager) UpdateConfig(ctx context.Context, cfgs map[string]any) error {\n\treturn c.Store.Update(ctx, cfgs)\n}\n\n// GetItemFromDriver ...\nfunc (c *CfgManager) GetItemFromDriver(ctx context.Context, key string) (map[string]any, error) {\n\treturn c.Store.GetFromDriver(ctx, key)\n}\n\n// ValidateCfg validate config by metadata. return the first error if exist.\nfunc (c *CfgManager) ValidateCfg(ctx context.Context, cfgs map[string]any) error {\n\tfor key, value := range cfgs {\n\t\titem, exist := metadata.Instance().GetByName(key)\n\t\tif !exist {\n\t\t\treturn fmt.Errorf(\"invalid config, item not defined in metadatalist, %v\", key)\n\t\t}\n\t\tif item.Scope == metadata.SystemScope {\n\t\t\treturn fmt.Errorf(\"system config items cannot be updated, item: %v\", key)\n\t\t}\n\n\t\tstrVal := utils.GetStrValueOfAnyType(value)\n\n\t\t// Trim spaces from the robot_name_prefix before validation\n\t\tif key == common.RobotNamePrefix {\n\t\t\tstrVal = strings.TrimSpace(strVal)\n\t\t\tif len(strVal) == 0 {\n\t\t\t\treturn fmt.Errorf(\"robot_name_prefix cannot be empty or contain only spaces\")\n\t\t\t}\n\t\t\tcfgs[key] = strVal\n\t\t}\n\n\t\t// check storage per project before setting it\n\t\tif key == common.StoragePerProject {","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/config/manager.go#L176-L212","documentation":"Error \"invalid config, item not defined in metadatalist, %v\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/config/manager.go:194 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"}