{"record":{"id":"948d26047fd9bf8a","repo":"chenhg5/cc-connect","slug":"discord-invalid-progress-style-q-want-legacy-c","errorCode":null,"errorMessage":"discord: invalid progress_style %q (want legacy, compact, or card)","messagePattern":"discord: invalid progress_style %q \\(want legacy, compact, or card\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"platform/discord/discord.go","lineNumber":114,"sourceCode":"\t\tgroupReplyAllGuilds = []string{\"*\"}\n\t}\n\tshareSessionInChannel, _ := opts[\"share_session_in_channel\"].(bool)\n\tthreadIsolation, _ := opts[\"thread_isolation\"].(bool)\n\trespondToAtEveryoneAndHere, _ := opts[\"respond_to_at_everyone_and_here\"].(bool)\n\t// Default to \"compact\" so streaming edits work out of the box (Discord\n\t// supports MessageUpdater.UpdateMessage). Users can opt back into the old\n\t// \"send entire reply at once\" behavior with progress_style = \"legacy\".\n\tprogressStyle := \"compact\"\n\tif v, ok := opts[\"progress_style\"].(string); ok {\n\t\tswitch strings.ToLower(strings.TrimSpace(v)) {\n\t\tcase \"\":\n\t\t\t// keep default\n\t\tcase \"legacy\":\n\t\t\tprogressStyle = \"legacy\"\n\t\tcase \"compact\", \"card\":\n\t\t\tprogressStyle = strings.ToLower(strings.TrimSpace(v))\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"discord: invalid progress_style %q (want legacy, compact, or card)\", v)\n\t\t}\n\t}\n\n\tvar proxyU *url.URL\n\tif proxyStr, _ := opts[\"proxy\"].(string); proxyStr != \"\" {\n\t\tu, err := url.Parse(proxyStr)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"discord: invalid proxy URL %q: %w\", proxyStr, err)\n\t\t}\n\t\tif user, _ := opts[\"proxy_username\"].(string); user != \"\" {\n\t\t\tpass, _ := opts[\"proxy_password\"].(string)\n\t\t\tu.User = url.UserPassword(user, pass)\n\t\t}\n\t\tproxyU = u\n\t}\n\n\tbase := &Platform{\n\t\ttoken:                      token,","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/platform/discord/discord.go#L96-L132","documentation":"The Discord adapter validates the optional \"progress_style\" option against a fixed set: legacy, compact, or card (case-insensitive; default compact for unset/empty). Any other non-empty value is rejected at construction time with this error naming the offending value.","triggerScenarios":"Calling discord.New(opts) with opts[\"progress_style\"] set to a string that, after trimming and lowercasing, is not one of \"legacy\", \"compact\", or \"card\" — e.g. \"minimal\", \"bar\", \"Compact \" would be fine but \"fancy\" fails.","commonSituations":"Typo in config.toml (progress_style = \"progres\"); copying a style name from another platform adapter that supports different values; older config using a value removed in a version change.","solutions":["Set progress_style in the discord platform config to exactly one of: legacy, compact, or card (case-insensitive).","Remove the progress_style option entirely to use the default (compact).","Check the platform docs/changelog if you relied on a style name that no longer exists.","Correct any trailing punctuation or typos in the TOML string value."],"exampleFix":"// before\nprogress_style = \"fancy\"\n\n// after\nprogress_style = \"card\"","handlingStrategy":"validation","validationCode":"var validProgressStyles = map[string]bool{\"legacy\": true, \"compact\": true, \"card\": true}\nfunc progressStyleValid(v string) bool {\n    return v == \"\" || validProgressStyles[strings.ToLower(strings.TrimSpace(v))]\n}","typeGuard":null,"tryCatchPattern":"p, err := discord.New(opts)\nif err != nil && strings.Contains(err.Error(), \"invalid progress_style\") {\n    log.Fatalf(\"config error: %v (use legacy|compact|card)\", err)\n}","preventionTips":["Copy style values verbatim from the docs: legacy, compact, card","Omit progress_style to accept the default","Trim whitespace and keep values lowercase in config","Add a config lint step that checks option values before deploy"],"tags":["discord","configuration","validation","enum"],"backgroundTag":"invalid-enum-value","analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}