{"record":{"id":"afa3e4d5753c27d7","repo":"chenhg5/cc-connect","slug":"missing-channel","errorCode":null,"errorMessage":"missing --channel","messagePattern":"missing --channel","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/cc-connect/tuitui.go","lineNumber":143,"sourceCode":"\toutPath := filepath.Join(outDir, filepath.Base(name))\n\tif err := os.WriteFile(outPath, data, 0o644); err != nil {\n\t\tfatalTuiTui(err)\n\t}\n\tprintJSON(map[string]any{\n\t\t\"path\":      outPath,\n\t\t\"mime_type\": mimeType,\n\t\t\"filename\":  name,\n\t\t\"size\":      len(data),\n\t})\n}\n\nfunc runTuiTuiPost(args []string) {\n\topts, err := parseTuiTuiArgs(args)\n\tif err != nil {\n\t\tfatalTuiTui(err)\n\t}\n\tif opts.channelID == \"\" {\n\t\tfatalTuiTui(errors.New(\"missing --channel\"))\n\t}\n\tmessage := opts.message\n\tif opts.stdin {\n\t\tdata, err := io.ReadAll(os.Stdin)\n\t\tif err != nil {\n\t\t\tfatalTuiTui(fmt.Errorf(\"read stdin: %w\", err))\n\t\t}\n\t\tmessage = string(data)\n\t}\n\tif strings.TrimSpace(message) == \"\" {\n\t\tfatalTuiTui(errors.New(\"missing --message or --stdin\"))\n\t}\n\tp, err := loadTuiTuiPlatform(opts)\n\tif err != nil {\n\t\tfatalTuiTui(err)\n\t}\n\tctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)\n\tdefer cancel()","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/cmd/cc-connect/tuitui.go#L125-L161","documentation":"A sentinel validation error raised by runTuiTuiPost when the parsed tuitui options contain an empty --channel value. It fires because posting a message requires a destination channel ID that was not supplied.","triggerScenarios":"Running `cc-connect tuitui post` without `--channel <id>`, or with an empty value for the flag.","commonSituations":"Hardcoded scripts where the channel id was never filled in, team members running a shared command that assumes a default channel, or confusing --channel with --chat used by the messages subcommand.","solutions":["Add `--channel <channel_id>` to the post command","Look up the channel id in the TuiTui platform settings","If the message should go to a chat instead, use the appropriate subcommand's flag"],"exampleFix":"// before\ncc-connect tuitui post --message \"hi\"\n// after\ncc-connect tuitui post --channel C012345 --message \"hi\"","handlingStrategy":"validation","validationCode":"if channelID == \"\" {\n    return errors.New(\"post requires --channel\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the channel id in a script/config variable instead of typing it each time","Don't confuse --channel (post) with --chat (messages/search)","Verify channel ids after platform reconfigurations"],"tags":["cli","tuitui","arguments","post"],"backgroundTag":"missing-required-flag","analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}