{"record":{"id":"f9f6b0f167a734ed","repo":"multica-ai/multica","slug":"value-q-is-not-a-valid-number-f9f6b0","errorCode":null,"errorMessage":"value %q is not a valid number","messagePattern":"value %q is not a valid number","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_property.go","lineNumber":479,"sourceCode":"\t\tparts := strings.Split(raw, \",\")\n\t\tids := make([]string, 0, len(parts))\n\t\tfor _, part := range parts {\n\t\t\tif strings.TrimSpace(part) == \"\" {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tid, err := resolveOption(part)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tids = append(ids, id)\n\t\t}\n\t\tif len(ids) == 0 {\n\t\t\treturn nil, fmt.Errorf(\"--value must list at least one option; valid options: %s\", strings.Join(optionNames, \", \"))\n\t\t}\n\t\treturn json.Marshal(ids)\n\tcase \"number\":\n\t\tif _, err := strconv.ParseFloat(raw, 64); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"value %q is not a valid number\", raw)\n\t\t}\n\t\treturn json.RawMessage(raw), nil\n\tcase \"checkbox\":\n\t\tif raw != \"true\" && raw != \"false\" {\n\t\t\treturn nil, fmt.Errorf(\"value %q is not a valid bool (expected true or false)\", raw)\n\t\t}\n\t\treturn json.RawMessage(raw), nil\n\tdefault: // text, date, url — validated server-side\n\t\treturn json.Marshal(raw)\n\t}\n}\n\n// formatIssuePropertyValue renders a stored value for humans: option ids\n// become option names, everything else prints via formatMetadataValue.\nfunc formatIssuePropertyValue(property propertyDTO, value any) string {\n\toptionName := func(id string) string {\n\t\tfor _, opt := range property.Config.Options {\n\t\t\tif opt.ID == id {","sourceCodeStart":461,"sourceCodeEnd":497,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_property.go#L461-L497","documentation":"Returned by `encodeIssuePropertyValue` when a number-typed property receives a `--value` that Go's `strconv.ParseFloat` cannot parse. The raw value is echoed verbatim so the bad input is obvious.","triggerScenarios":"`--value abc`, `--value 1,5` (comma decimal), `--value \"\"`, or any non-numeric string on a property whose type is `number`. Note the raw string is forwarded as JSON after the check, so it must parse as a float.","commonSituations":"Locale-formatted numbers (`1,5` instead of `1.5`); empty shell variables; trailing whitespace or units (`10px`) in scripted values.","solutions":["Pass a plain decimal number in dot notation: `--value 3.14`, `--value -2`, `--value 1e3`.","Strip units/whitespace/locale separators in the calling script before passing the value.","Check the property's type with `multica property list` if unsure whether it expects a number."],"exampleFix":"// before\nmultica issue property set ISS-1 --name Estimate --value \"1,5\"\n// error: value \"1,5\" is not a valid number\n\n// after\nmultica issue property set ISS-1 --name Estimate --value \"1.5\"","handlingStrategy":"validation","validationCode":"# bash: verify numeric input in dot notation before passing it\ncase \"$VAL\" in ''|*[!0-9.eE+-]*) echo \"not a number: $VAL\" >&2; exit 1;; esac","typeGuard":"func isParsableNumber(raw string) bool {\n    _, err := strconv.ParseFloat(raw, 64)\n    return err == nil\n}","tryCatchPattern":null,"preventionTips":["Use dot decimal notation, never locale commas.","Pass raw numbers without units or surrounding whitespace.","Empty variables intended as 'unset' should call unset, not set."],"tags":["go","cli","validation","number","strconv"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}