goharbor/harbor · error · errors.Error
BAD_REQUEST
BAD_REQUEST
Error message
the query string must contain "=" and the key/value cannot be empty
What it means
Error "the query string must contain "=" and the key/value cannot be empty" thrown in goharbor/harbor.
Source
Thrown at src/lib/q/builder.go:65
}, nil
}
func parseKeywords(q string) (map[string]any, error) {
keywords := map[string]any{}
if len(q) == 0 {
return keywords, nil
}
// try to escaped the 'q=tags%3Dnil' when to filter tags.
if unescapedQuery, err := url.QueryUnescape(q); err == nil {
q = unescapedQuery
} else {
log.Errorf("failed to unescape the query %s: %v", q, err)
}
for param := range strings.SplitSeq(q, ",") {
strs := strings.SplitN(param, "=", 2)
if len(strs) != 2 || len(strs[0]) == 0 || len(strs[1]) == 0 {
return nil, errors.New(nil).
WithCode(errors.BadRequestCode).
WithMessage(`the query string must contain "=" and the key/value cannot be empty`)
}
value, err := parsePattern(strs[1])
if err != nil {
return nil, errors.New(err).
WithCode(errors.BadRequestCode).
WithMessagef("invalid query string value: %s", strs[1])
}
keywords[strs[0]] = value
}
return keywords, nil
}
func ParseSorting(sort string) []*Sort {
if sort == "" {
return []*Sort{}
}View on GitHub (pinned to 7b2fd08cc5)
When it happens
Trigger: Thrown at src/lib/q/builder.go:65 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/a7ba9a65b4b8891a.
Report an issue: GitHub.