{"record":{"id":"bdfae14e3c6d20e8","repo":"goharbor/harbor","slug":"bad-request-bdfae1","errorCode":"BAD_REQUEST","errorMessage":"keyword: %v, the query type is not allowed","messagePattern":"keyword: (.+?), the query type is not allowed","errorType":"validation","errorClass":"lib/errors.Error","httpStatus":400,"severity":"error","filePath":"src/pkg/securityhub/dao/security.go","lineNumber":372,"sourceCode":"\t}\n\tparams = append(params, pageSize, offSet)\n\treturn fmt.Sprintf(\"%v order by cvss_score_v3 desc nulls last limit ? offset ? \", sqlStr), params\n}\n\nfunc checkQFilter(query *q.Query, filterMap map[string]*filterMetaData) error {\n\tif query == nil {\n\t\treturn nil\n\t}\n\tif len(query.Keywords) == 0 {\n\t\treturn nil\n\t}\n\tfor k := range query.Keywords {\n\t\tif metadata, exist := filterMap[k]; exist {\n\t\t\ttypeName := metadata.DataType\n\t\t\tswitch typeName {\n\t\t\tcase rangeType:\n\t\t\t\tif _, ok := query.Keywords[k].(*q.Range); !ok {\n\t\t\t\t\treturn errors.BadRequestError(fmt.Errorf(\"keyword: %v, the query type is not allowed\", k))\n\t\t\t\t}\n\t\t\tcase stringType:\n\t\t\t\tif _, ok := query.Keywords[k].(string); !ok {\n\t\t\t\t\treturn errors.BadRequestError(fmt.Errorf(\"keyword: %v, the query type is not allowed\", k))\n\t\t\t\t}\n\t\t\tcase intType:\n\t\t\t\tif _, ok := query.Keywords[k].(int); !ok {\n\t\t\t\t\treturn errors.BadRequestError(fmt.Errorf(\"keyword: %v, the query type is not allowed\", k))\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn errors.BadRequestError(fmt.Errorf(\"keyword: %v is not allowed\", k))\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":354,"sourceCodeEnd":389,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/securityhub/dao/security.go#L354-L389","documentation":"Error \"keyword: %v, the query type is not allowed\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/securityhub/dao/security.go:372 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"}