{"record":{"id":"0114f46ec765053b","repo":"gastownhall/beads","slug":"invalid-issue-type-q-valid-s","errorCode":null,"errorMessage":"invalid issue type %q (valid: %s)","messagePattern":"invalid issue type %q \\(valid: (.+?)\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/workapi/list.go","lineNumber":262,"sourceCode":"\t\tfilter.ExcludeStatus = excludeStatuses\n\t}\n\n\tif in.Priority != nil {\n\t\tp := *in.Priority\n\t\tfilter.Priority = &p\n\t}\n\tif in.Assignee != \"\" {\n\t\ta := in.Assignee\n\t\tfilter.Assignee = &a\n\t}\n\tif in.IssueType != \"\" {\n\t\tt := types.IssueType(in.IssueType)\n\t\tif !t.IsValidWithCustom(cfg.CustomTypes) {\n\t\t\tvalidTypes := \"bug, feature, task, epic, chore, decision\"\n\t\t\tif len(cfg.CustomTypes) > 0 {\n\t\t\t\tvalidTypes += \", \" + strings.Join(cfg.CustomTypes, \", \")\n\t\t\t}\n\t\t\treturn filter, fmt.Errorf(\"invalid issue type %q (valid: %s)\", in.IssueType, validTypes)\n\t\t}\n\t\tfilter.IssueType = &t\n\t}\n\n\tif len(in.Labels) > 0 {\n\t\tfilter.Labels = in.Labels\n\t}\n\tif len(in.LabelsAny) > 0 {\n\t\tfilter.LabelsAny = in.LabelsAny\n\t}\n\tif len(in.ExcludeLabels) > 0 {\n\t\tfilter.ExcludeLabels = in.ExcludeLabels\n\t}\n\tif in.LabelPattern != \"\" {\n\t\tfilter.LabelPattern = in.LabelPattern\n\t}\n\tif in.LabelRegex != \"\" {\n\t\tfilter.LabelRegex = in.LabelRegex","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/workapi/list.go#L244-L280","documentation":"BuildListFilter validates the requested --type value against the built-in issue types (bug, feature, task, epic, chore, decision) plus any custom types loaded into ListConfig. An unrecognized type string is rejected with the full list of valid values.","triggerScenarios":"Passing issueops.ListRequest with IssueType set to a value not in the built-in set nor in cfg.CustomTypes — e.g. a typo ('feat'), a custom type defined after the config was loaded, or calling BuildListFilter with an empty ListConfig that omits configured custom types.","commonSituations":"Typo in CLI --type flag; custom type added to YAML but not present in the store so CustomTypes falls back to YAML (or vice versa); using a custom type before bdinit registered it; stale config cache missing a newly added custom type.","solutions":["Use one of the valid built-in types: bug, feature, task, epic, chore, decision","If you meant a custom type, verify it is registered in config.yaml or via `bd type` and that the ListConfig was loaded with those custom types (LoadListConfig)","Fix the spelling/casing of the type string","Re-load ListConfig from the workspace so cfg.CustomTypes includes the new type"],"exampleFix":"// before\nreq.IssueType = \"feat\"\n// after\nreq.IssueType = \"feature\" // or register 'feat' as a custom type and reload ListConfig","handlingStrategy":"validation","validationCode":"func validType(t string, custom []string) bool {\n    for _, v := range append([]string{\"bug\",\"feature\",\"task\",\"epic\",\"chore\",\"decision\"}, custom...) {\n        if v == t { return true }\n    }\n    return false\n}\nif in.IssueType != \"\" && !validType(in.IssueType, cfg.CustomTypes) { return err }","typeGuard":null,"tryCatchPattern":"filter, err := workapi.BuildListFilter(req, cfg)\nif err != nil && strings.HasPrefix(err.Error(), \"invalid issue type\") {\n    return fmt.Errorf(\"choose a type from: %s\", err)\n}","preventionTips":["Validate --type against cfg.CustomTypes before building the filter","Keep custom types in sync between config.yaml and the store","Load ListConfig via LoadListConfig so custom types are included","Show valid types in CLI help/flag completion"],"tags":["validation","issue-type","cli"],"backgroundTag":"invalid-enum-value","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}