{"record":{"id":"db1111fc1debafed","repo":"quickwit-oss/quickwit","slug":"unknown-source-subcommand-subcommand","errorCode":null,"errorMessage":"unknown source subcommand `{subcommand}`","messagePattern":"unknown source subcommand `(.+?)`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-cli/src/source.rs","lineNumber":250,"sourceCode":"        let (subcommand, submatches) = matches\n            .remove_subcommand()\n            .context(\"failed to parse source subcommand\")?;\n        match subcommand.as_str() {\n            \"create\" => Self::parse_create_args(submatches).map(Self::CreateSource),\n            \"update\" => Self::parse_update_args(submatches).map(Self::UpdateSource),\n            \"enable\" => {\n                Self::parse_toggle_source_args(&subcommand, submatches).map(Self::ToggleSource)\n            }\n            \"disable\" => {\n                Self::parse_toggle_source_args(&subcommand, submatches).map(Self::ToggleSource)\n            }\n            \"delete\" => Self::parse_delete_args(submatches).map(Self::DeleteSource),\n            \"describe\" => Self::parse_describe_args(submatches).map(Self::DescribeSource),\n            \"list\" => Self::parse_list_args(submatches).map(Self::ListSources),\n            \"reset-checkpoint\" => {\n                Self::parse_reset_checkpoint_args(submatches).map(Self::ResetCheckpoint)\n            }\n            _ => bail!(\"unknown source subcommand `{subcommand}`\"),\n        }\n    }\n\n    fn parse_create_args(mut matches: ArgMatches) -> anyhow::Result<CreateSourceArgs> {\n        let client_args = ClientArgs::parse(&mut matches)?;\n        let index_id = matches\n            .remove_one::<String>(\"index\")\n            .expect(\"`index` should be a required arg.\");\n        let source_config_uri = matches\n            .remove_one::<String>(\"source-config\")\n            .map(|uri_str| Uri::from_str(&uri_str))\n            .expect(\"`source-config` should be a required arg.\")?;\n        Ok(CreateSourceArgs {\n            client_args,\n            index_id,\n            source_config_uri,\n        })\n    }","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-cli/src/source.rs#L232-L268","documentation":"The `quickwit source` CLI dispatches to a fixed set of subcommands (create, delete, describe, list, reset-checkpoint). Any unrecognized first argument after `source` fails argument parsing with this message. It is a usage error surfaced by clap's `remove_subcommand` fallback, so nothing is sent to the server.","triggerScenarios":"Running `quickwit source <anything-not-in {create,delete,describe,list,reset-checkpoint}> ...`, e.g. typos like `quickwit source ls`, `quickwit source creat`, or a subcommand that exists for another noun (e.g. `quickwit source update`).","commonSituations":"Typo or abbreviated subcommand; muscle memory from other CLIs (`ls`/`rm` instead of `list`/`delete`); following outdated docs where a subcommand was renamed; shell scripts referencing an older Quickwit version's syntax.","solutions":["Run `quickwit source --help` to list the valid subcommands and use one of them exactly.","Fix the spelling of the subcommand (e.g. `ls` -> `list`, `creat` -> `create`).","Check your Quickwit version; if following older docs, use the documented subcommand set (create, delete, describe, list, reset-checkpoint)."],"exampleFix":"// before\nquickwit source ls --index my-index\n// after\nquickwit source list --index my-index","handlingStrategy":"validation","validationCode":"const SOURCE_SUBCOMMANDS = [\"create\", \"delete\", \"describe\", \"list\", \"reset-checkpoint\"];\nfunction isValidSourceSubcommand(cmd: string): boolean {\n  return SOURCE_SUBCOMMANDS.includes(cmd);\n}","typeGuard":"function isSourceSubcommand(cmd: string): cmd is \"create\" | \"delete\" | \"describe\" | \"list\" | \"reset-checkpoint\" {\n  return [\"create\", \"delete\", \"describe\", \"list\", \"reset-checkpoint\"].includes(cmd);\n}","tryCatchPattern":"// Exit code 2 (clap usage error) with stderr matching /unknown source subcommand/\nconst res = await run(\"quickwit source list --index my-index\");\nif (res.code === 2 && /unknown source subcommand/.test(res.stderr)) {\n  console.error(\"Fix the subcommand; run `quickwit source --help`.\");\n}","preventionTips":["Consult `quickwit source --help` for the exact subcommand list before scripting.","Avoid abbreviations (`ls`, `rm`) that other CLIs accept but Quickwit does not.","Pin the Quickwit version in CI so scripts match the CLI surface of that release."],"tags":["cli","subcommand","quickwit"],"backgroundTag":"invalid-cli-argument","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}