{"record":{"id":"00e3579646e86017","repo":"chenhg5/cc-connect","slug":"missing-url","errorCode":null,"errorMessage":"missing --url","messagePattern":"missing --url","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/cc-connect/tuitui.go","lineNumber":107,"sourceCode":"\t\tLimit:        opts.limit,\n\t\tOrderAsc:     opts.orderAsc,\n\t})\n\tif err != nil {\n\t\tfatalTuiTui(err)\n\t}\n\tif command == \"search\" {\n\t\tresult = filterTuiTuiHistory(result, opts.query)\n\t}\n\tprintJSON(result)\n}\n\nfunc runTuiTuiDownload(args []string) {\n\topts, err := parseTuiTuiArgs(args)\n\tif err != nil {\n\t\tfatalTuiTui(err)\n\t}\n\tif opts.url == \"\" {\n\t\tfatalTuiTui(errors.New(\"missing --url\"))\n\t}\n\tctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)\n\tdefer cancel()\n\tdata, mimeType, name, err := downloadTuiTuiURL(ctx, opts.url, opts.maxBytes)\n\tif err != nil {\n\t\tfatalTuiTui(err)\n\t}\n\toutDir := opts.outDir\n\tif outDir == \"\" {\n\t\toutDir = \"./tmp/tuitui\"\n\t}\n\tif name == \"\" || name == \".\" || name == \"/\" {\n\t\tname = fmt.Sprintf(\"tuitui_%d\", time.Now().Unix())\n\t}\n\tif err := os.MkdirAll(outDir, 0o755); err != nil {\n\t\tfatalTuiTui(err)\n\t}\n\toutPath := filepath.Join(outDir, filepath.Base(name))","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/cmd/cc-connect/tuitui.go#L89-L125","documentation":"A sentinel validation error raised by runTuiTuiDownload when the parsed tuitui options contain an empty --url value. It fires because the download operation requires a target URL and the argument was omitted or blank.","triggerScenarios":"Running `cc-connect tuitui download` without `--url <url>`, or with an empty --url value.","commonSituations":"Variable holding the URL was empty in a script, forgot the flag after copy-pasting only the message-related options, or intended to pipe a file via stdin but used the download subcommand.","solutions":["Add `--url <file_url>` pointing to the resource to download","Verify the URL variable is populated before invoking the command","Use the tuitui post/send path instead if the intent was to upload a local file"],"exampleFix":"// before\ncc-connect tuitui download --max-bytes 1048576\n// after\ncc-connect tuitui download --url https://example.com/file.png","handlingStrategy":"validation","validationCode":"if url == \"\" {\n    return errors.New(\"download requires --url\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate URL variables are populated before invoking download","Distinguish upload (post/send) from download (fetch remote URL) use cases","Check the upstream command that produced the URL succeeded"],"tags":["cli","tuitui","arguments","download"],"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"}