{"record":{"id":"9b928ce06cca1a7e","repo":"goharbor/harbor","slug":"invalid-non-positive-value-for-quota-limit-value","errorCode":null,"errorMessage":"invalid non-positive value for quota limit, value=%v","messagePattern":"invalid non-positive value for quota limit, value=(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/quota_storage_limit.go","lineNumber":26,"sourceCode":"//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage lib\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/goharbor/harbor/src/pkg/quota/types\"\n)\n\nfunc ValidateQuotaLimit(storageLimit int64) error {\n\tif storageLimit <= 0 {\n\t\tif storageLimit != types.UNLIMITED {\n\t\t\treturn fmt.Errorf(\"invalid non-positive value for quota limit, value=%v\", storageLimit)\n\t\t}\n\t} else {\n\t\t// storageLimit > 0, there is a max capacity of limited storage\n\t\tif uint64(storageLimit) > types.MaxLimitedValue {\n\t\t\treturn fmt.Errorf(\"exceeded 1024TB, which is 1125899906842624 Bytes, value=%v\", storageLimit)\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":8,"sourceCodeEnd":36,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/lib/quota_storage_limit.go#L8-L36","documentation":"Error \"invalid non-positive value for quota limit, value=%v\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/lib/quota_storage_limit.go:26 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"}