{"record":{"id":"a7ba9a65b4b8891a","repo":"goharbor/harbor","slug":"bad-request-a7ba9a","errorCode":"BAD_REQUEST","errorMessage":"the query string must contain \"=\" and the key/value cannot be empty","messagePattern":"the query string must contain \"=\" and the key/value cannot be empty","errorType":"validation","errorClass":"errors.Error","httpStatus":400,"severity":"error","filePath":"src/lib/q/builder.go","lineNumber":65,"sourceCode":"\t}, nil\n}\n\nfunc parseKeywords(q string) (map[string]any, error) {\n\tkeywords := map[string]any{}\n\tif len(q) == 0 {\n\t\treturn keywords, nil\n\t}\n\t// try to escaped the 'q=tags%3Dnil' when to filter tags.\n\tif unescapedQuery, err := url.QueryUnescape(q); err == nil {\n\t\tq = unescapedQuery\n\t} else {\n\t\tlog.Errorf(\"failed to unescape the query %s: %v\", q, err)\n\t}\n\n\tfor param := range strings.SplitSeq(q, \",\") {\n\t\tstrs := strings.SplitN(param, \"=\", 2)\n\t\tif len(strs) != 2 || len(strs[0]) == 0 || len(strs[1]) == 0 {\n\t\t\treturn nil, errors.New(nil).\n\t\t\t\tWithCode(errors.BadRequestCode).\n\t\t\t\tWithMessage(`the query string must contain \"=\" and the key/value cannot be empty`)\n\t\t}\n\t\tvalue, err := parsePattern(strs[1])\n\t\tif err != nil {\n\t\t\treturn nil, errors.New(err).\n\t\t\t\tWithCode(errors.BadRequestCode).\n\t\t\t\tWithMessagef(\"invalid query string value: %s\", strs[1])\n\t\t}\n\t\tkeywords[strs[0]] = value\n\t}\n\treturn keywords, nil\n}\n\nfunc ParseSorting(sort string) []*Sort {\n\tif sort == \"\" {\n\t\treturn []*Sort{}\n\t}","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/lib/q/builder.go#L47-L83","documentation":"Error \"the query string must contain \"=\" and the key/value cannot be empty\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/lib/q/builder.go:65 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"}