goharbor/harbor · error
quota value should be -1 or great than zero
Error message
quota value should be -1 or great than zero
What it means
Error "quota value should be -1 or great than zero" thrown in goharbor/harbor.
Source
Thrown at src/lib/config/metadata/type.go:232
func (t *StringToStringMapType) get(str string) (any, error) {
result := map[string]string{}
err := json.Unmarshal([]byte(str), &result)
return result, err
}
// QuotaType ...
type QuotaType struct {
Int64Type
}
func (t *QuotaType) validate(str string) error {
val, err := parseInt64(str)
if err != nil {
return err
}
if val <= 0 && val != -1 {
return fmt.Errorf("quota value should be -1 or great than zero")
}
return nil
}
// DurationType ...
type DurationType struct {
}
func (t *DurationType) validate(str string) error {
_, err := time.ParseDuration(str)
return err
}
func (t *DurationType) get(str string) (any, error) {
// should not parse the duration to avoid duplicate parse.
return str, nil
}View on GitHub (pinned to 7b2fd08cc5)
When it happens
Trigger: Thrown at src/lib/config/metadata/type.go:232 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/3c31e5f03b7a92c8.
Report an issue: GitHub.