{"record":{"id":"c0519b55bc80e545","repo":"goharbor/harbor","slug":"resource-s-not-found","errorCode":null,"errorMessage":"resource %s not found","messagePattern":"resource (.+?) not found","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/controller/quota/driver/project/project.go","lineNumber":102,"sourceCode":"\nfunc (d *driver) Validate(hardLimits types.ResourceList) error {\n\tresources := map[types.ResourceName]bool{\n\t\ttypes.ResourceStorage: true,\n\t}\n\n\tfor resource, value := range hardLimits {\n\t\tif !resources[resource] {\n\t\t\treturn fmt.Errorf(\"resource %s not support\", resource)\n\t\t}\n\n\t\tif err := lib.ValidateQuotaLimit(value); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tfor resource := range resources {\n\t\tif _, found := hardLimits[resource]; !found {\n\t\t\treturn fmt.Errorf(\"resource %s not found\", resource)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (d *driver) CalculateUsage(ctx context.Context, key string) (types.ResourceList, error) {\n\tprojectID, err := strconv.ParseInt(key, 10, 64)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tsize, err := d.blobCtl.CalculateTotalSizeByProject(ctx, projectID, true)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn types.ResourceList{types.ResourceStorage: size}, nil","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/controller/quota/driver/project/project.go#L84-L120","documentation":"Error \"resource %s not found\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/controller/quota/driver/project/project.go:102 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"}