{"record":{"id":"4e098823f8d73245","repo":"gastownhall/beads","slug":"label-does-not-support-s-operator","errorCode":null,"errorMessage":"label does not support %s operator","messagePattern":"label does not support (.+?) operator","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/query/evaluator.go","lineNumber":845,"sourceCode":"\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t}, nil\n\tcase OpNotEquals:\n\t\tif isNone {\n\t\t\treturn func(i *types.Issue) bool { return len(i.Labels) > 0 }, nil\n\t\t}\n\t\treturn func(i *types.Issue) bool {\n\t\t\tfor _, l := range i.Labels {\n\t\t\t\tif strings.EqualFold(l, value) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true\n\t\t}, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"label does not support %s operator\", comp.Op.String())\n\t}\n}\n\nfunc (e *Evaluator) buildTitlePredicate(comp *ComparisonNode) (func(*types.Issue) bool, error) {\n\tvalue := strings.ToLower(comp.Value)\n\tswitch comp.Op {\n\tcase OpEquals:\n\t\treturn func(i *types.Issue) bool {\n\t\t\treturn strings.Contains(strings.ToLower(i.Title), value)\n\t\t}, nil\n\tcase OpNotEquals:\n\t\treturn func(i *types.Issue) bool {\n\t\t\treturn !strings.Contains(strings.ToLower(i.Title), value)\n\t\t}, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"title does not support %s operator\", comp.Op.String())\n\t}\n}","sourceCodeStart":827,"sourceCodeEnd":863,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/query/evaluator.go#L827-L863","documentation":"The `label` field only supports Equals, NotEquals, and contains-style matching implemented inside the predicate's earlier cases. Any other operator reaches the default branch of buildLabelPredicate and returns this error. The label predicate also special-cases none/null for unlabeled issues.","triggerScenarios":"A query filter like `label > urgent` or `label <= blocked` — comparison on label with an operator outside the supported set (=, !=, and the contains case handled above the default).","commonSituations":"Assuming label supports the same operator set as priority (which has ordering); using range syntax to express \"any of several labels\"; dialect carryover from tag-search syntax in other tools.","solutions":["Use `label = <name>`, `label != <name>`, or the supported contains form.","To match any of several labels, OR separate label filters.","Use `label = none` to find unlabeled issues."],"exampleFix":"// before\nbd list --query \"label > urgent\"\n// after\nbd list --query \"label = urgent OR label = blocked\"","handlingStrategy":"validation","validationCode":"// Go: label supports = / != / contains only\nswitch comp.Op {\ncase query.OpEquals, query.OpNotEquals:\n    // ok\ndefault:\n    // only the contains form handled by the predicate; reject others\n    if !isContainsOp(comp.Op) {\n        return fmt.Errorf(\"label supports only =, !=, contains, got %s\", comp.Op)\n    }\n}","typeGuard":null,"tryCatchPattern":"// Go\npred, err := e.buildComparisonPredicate(node)\nif err != nil {\n    return fmt.Errorf(\"label filter invalid: %w\", err)\n}","preventionTips":["Stick to =, !=, and contains for labels.","Use OR of equality filters to match any of several labels.","Use the none sentinel to find unlabeled issues."],"tags":["query-language","unsupported-operator","label"],"backgroundTag":"query-unsupported-operator","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}