{"record":{"id":"db5db8481d6e1c75","repo":"multica-ai/multica","slug":"invalid-s-q-valid-values-s","errorCode":null,"errorMessage":"invalid %s %q; valid values: %s","messagePattern":"invalid (.+?) %q; valid values: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_issue.go","lineNumber":415,"sourceCode":"\t}\n\treturn cols\n}()\n\nfunc validateIssueStatus(status string) error {\n\treturn validateIssueEnum(\"status\", status, validIssueStatuses)\n}\n\nfunc validateIssuePriority(priority string) error {\n\treturn validateIssueEnum(\"priority\", priority, validIssuePriorities)\n}\n\nfunc validateIssueEnum(field, value string, allowed []string) error {\n\tfor _, a := range allowed {\n\t\tif value == a {\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn fmt.Errorf(\"invalid %s %q; valid values: %s\", field, value, strings.Join(allowed, \", \"))\n}\n\nfunc init() {\n\tissueCmd.AddCommand(issueListCmd)\n\tissueCmd.AddCommand(issueGetCmd)\n\tissueCmd.AddCommand(issuePullRequestsCmd)\n\tissueCmd.AddCommand(issueChildrenCmd)\n\tissueCmd.AddCommand(issueCreateCmd)\n\tissueCmd.AddCommand(issueUpdateCmd)\n\tissueCmd.AddCommand(issueAssignCmd)\n\tissueCmd.AddCommand(issueStatusCmd)\n\tissueCmd.AddCommand(issueReorderCmd)\n\tissueCmd.AddCommand(issueCommentCmd)\n\tissueCmd.AddCommand(issueSubscriberCmd)\n\tissueCmd.AddCommand(issueRunsCmd)\n\tissueCmd.AddCommand(issueRunMessagesCmd)\n\tissueCmd.AddCommand(issueUsageCmd)\n\tissueCmd.AddCommand(issueRerunCmd)","sourceCodeStart":397,"sourceCodeEnd":433,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_issue.go#L397-L433","documentation":"The value passed to --priority (or another issue enum field validated by validateIssueEnum) is not in the allowed set. The error lists the exact valid values, so this is purely an input-validation failure resolved by using one of the enumerated strings. Validation happens client-side before any API call.","triggerScenarios":"Running `multica issue create --priority <bad>` or `issue update --priority <bad>` with a value not in validIssuePriorities — e.g. 'high ' with trailing whitespace, 'High' capitalized, 'urgent' (a plausible but invalid name), or an empty-string-adjacent typo.","commonSituations":"Scripts hardcoding a priority name that doesn't exist in this workspace; copying values from another tracker (Jira 'P1', Linear 'urgent'); case or whitespace mismatches from shell variable interpolation.","solutions":["Use one of the values listed in the error message verbatim (they are printed as the valid set).","If sourcing the value from a variable, trim whitespace and lowercase it before passing: --priority \"$(echo \"$P\" | tr -d ' ')\".","Omit --priority entirely to accept the default instead of guessing."],"exampleFix":"# before\nmultica issue create --title T --priority urgent\n# after\nmultica issue create --title T --priority high","handlingStrategy":"validation","validationCode":"# shell: whitelist before passing\n case \"$PRIORITY\" in urgent|high|medium|low) ;; *) echo \"bad priority: $PRIORITY\" >&2; exit 1;; esac\n# keep the list in sync with the values the error message prints","typeGuard":"func isValidPriority(v string, allowed []string) bool {\n\tfor _, a := range allowed {\n\t\tif v == a {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}","tryCatchPattern":null,"preventionTips":["Source enum values from one place (config var) instead of scattering literals in scripts.","Trim and case-normalize variable-sourced values before passing them as flags.","Omit optional enum flags rather than guessing values."],"tags":["cli","validation","enum","priority"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}