goharbor/harbor · error
min and max at least one should be set in range'
Error message
min and max at least one should be set in range'
What it means
Error "min and max at least one should be set in range'" thrown in goharbor/harbor.
Source
Thrown at src/lib/q/builder.go:138
func parseFuzzyMatchValue(value string) (*FuzzyMatchValue, error) {
if len(value) < 2 || value[0] != '~' {
return nil, fmt.Errorf(`fuzzy match value must start with "~" and contain at least 1 other characters`)
}
return &FuzzyMatchValue{
Value: value[1:],
}, nil
}
func parseRange(value string) (*Range, error) {
length := len(value)
if value[length-1] != ']' || strings.Count(value, "~") != 1 {
return nil, fmt.Errorf(`range must start with "[", end with "]" and contains only one "~"`)
}
strs := strings.SplitN(value[1:length-1], "~", 2)
minVal := strings.TrimSpace(strs[0])
maxVal := strings.TrimSpace(strs[1])
if len(minVal) == 0 && len(maxVal) == 0 {
return nil, fmt.Errorf(`min and max at least one should be set in range'`)
}
r := &Range{}
if len(minVal) > 0 {
r.Min = parseValue(minVal)
}
if len(maxVal) > 0 {
r.Max = parseValue(maxVal)
}
return r, nil
}
func parseOrList(value string) (*OrList, error) {
values, err := parseList(value, '{')
if err != nil {
return nil, err
}
ol := &OrList{}
ol.Values = append(ol.Values, values...)View on GitHub (pinned to 7b2fd08cc5)
When it happens
Trigger: Thrown at src/lib/q/builder.go:138 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/4d60785ed9018f49.
Report an issue: GitHub.