{"record":{"id":"e596013faff617f1","repo":"multica-ai/multica","slug":"select-properties-require-at-least-one-option","errorCode":null,"errorMessage":"select properties require at least one option","messagePattern":"select properties require at least one option","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"server/internal/handler/property.go","lineNumber":247,"sourceCode":"\nfunc propertyTypeHasOptions(t string) bool {\n\treturn t == \"select\" || t == \"multi_select\"\n}\n\n// validatePropertyConfig canonicalizes the config for storage. Select-type\n// properties require 1..50 options; each option gets a stable server-assigned\n// UUID if the caller didn't provide one (values reference option IDs, so\n// option renames never touch issue rows). Non-select types must not carry\n// options and are stored as {}.\nfunc validatePropertyConfig(propType string, cfg *PropertyConfig) ([]byte, error) {\n\tif !propertyTypeHasOptions(propType) {\n\t\tif cfg != nil && len(cfg.Options) > 0 {\n\t\t\treturn nil, fmt.Errorf(\"type %q does not accept options\", propType)\n\t\t}\n\t\treturn []byte(`{}`), nil\n\t}\n\tif cfg == nil || len(cfg.Options) == 0 {\n\t\treturn nil, errors.New(\"select properties require at least one option\")\n\t}\n\tif len(cfg.Options) > maxPropertySelectOptions {\n\t\treturn nil, fmt.Errorf(\"a property cannot have more than %d options\", maxPropertySelectOptions)\n\t}\n\tseenIDs := make(map[string]struct{}, len(cfg.Options))\n\tseenNames := make(map[string]struct{}, len(cfg.Options))\n\tout := PropertyConfig{Options: make([]PropertyOption, 0, len(cfg.Options))}\n\tfor _, opt := range cfg.Options {\n\t\tname, err := validateLabelName(opt.Name)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"option %w\", err)\n\t\t}\n\t\tlower := strings.ToLower(name)\n\t\tif _, dup := seenNames[lower]; dup {\n\t\t\treturn nil, fmt.Errorf(\"duplicate option name %q\", name)\n\t\t}\n\t\tseenNames[lower] = struct{}{}\n\t\tcolor, err := normalizeColor(opt.Color)","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/handler/property.go#L229-L265","documentation":"Error \"select properties require at least one option\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/handler/property.go:247 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add at least one option to the select property before saving."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}