{"record":{"id":"5ca192fe30f0d30b","repo":"goharbor/harbor","slug":"system-config-items-cannot-be-updated-item-v","errorCode":null,"errorMessage":"system config items cannot be updated, item: %v","messagePattern":"system config items cannot be updated, item: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/config/manager.go","lineNumber":197,"sourceCode":"// 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 {\n\t\t\tstoragePerProject, err := strconv.ParseInt(strVal, 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"cannot parse string value(%v) to int64\", strVal)","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/config/manager.go#L179-L215","documentation":"Error \"system config items cannot be updated, item: %v\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/config/manager.go:197 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"}