{"record":{"id":"cdcf99a9a99de898","repo":"goharbor/harbor","slug":"or-list-must-start-with-and-end-with","errorCode":null,"errorMessage":"or list must start with \"{\" and end with \"}\"","messagePattern":"or list must start with \"(.+?)\"","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/q/builder.go","lineNumber":173,"sourceCode":"\tol := &OrList{}\n\tol.Values = append(ol.Values, values...)\n\treturn ol, nil\n}\n\nfunc parseAndList(value string) (*AndList, error) {\n\tvalues, err := parseList(value, '(')\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tal := &AndList{}\n\tal.Values = append(al.Values, values...)\n\treturn al, nil\n}\n\nfunc parseList(value string, c rune) ([]any, error) {\n\tlength := len(value)\n\tif c == '{' && value[length-1] != '}' {\n\t\treturn nil, fmt.Errorf(`or list must start with \"{\" and end with \"}\"`)\n\t}\n\tif c == '(' && value[length-1] != ')' {\n\t\treturn nil, fmt.Errorf(`and list must start with \"(\" and end with \")\"`)\n\t}\n\tvar vs []any\n\n\tfor str := range strings.SplitSeq(value[1:length-1], \" \") {\n\t\tv := parseValue(str)\n\t\tif s, ok := v.(string); ok && len(s) == 0 {\n\t\t\tcontinue\n\t\t}\n\t\tvs = append(vs, v)\n\t}\n\treturn vs, nil\n}\n\n// try to parse value as time first, then integer, and last string\nfunc parseValue(value string) any {","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/lib/q/builder.go#L155-L191","documentation":"Error \"or list must start with \"{\" and end with \"}\"\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/lib/q/builder.go:173 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"}