{"record":{"id":"e4e107bbc5b1ead4","repo":"nikivdev/code","slug":"unknown-release-provider-expected-registry","errorCode":null,"errorMessage":"Unknown release provider '{}'. Expected registry, task, or github.","messagePattern":"Unknown release provider '(.+?)'\\. Expected registry, task, or github\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/release.rs","lineNumber":106,"sourceCode":"        .and_then(|release| release.default.as_deref())\n        .or_else(|| {\n            cfg.release\n                .as_ref()\n                .and_then(|release| release.registry.as_ref())\n                .map(|_| \"registry\")\n        })\n        .unwrap_or(\"task\");\n\n    match provider {\n        \"registry\" => {\n            registry::publish(config_path, cfg, crate::cli::RegistryReleaseOpts::default())\n        }\n        \"task\" | \"release\" => run_task(ReleaseOpts {\n            config: config_path.to_path_buf(),\n            args: Vec::new(),\n        }),\n        \"github\" | \"gh\" => gh_release::run(GhReleaseCommand { action: None }),\n        other => bail!(\n            \"Unknown release provider '{}'. Expected registry, task, or github.\",\n            other\n        ),\n    }\n}\n","sourceCodeStart":88,"sourceCodeEnd":112,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/release.rs#L88-L112","documentation":"The `f release` dispatcher in run_default matches the provider subcommand against known providers (registry/task/release, github/gh). Any other provider string hits the catch-all arm and bails with this message. It guards against typos or unsupported providers being passed on the CLI.","triggerScenarios":"Running `f release <provider>` where <provider> is not one of registry, task, release, github, or gh (e.g. `f release npm` or `f release gitub`).","commonSituations":"Typos like `github` misspelled; assuming other providers (npm, cargo, gitea) are supported; stale docs/scripts referencing a removed provider alias.","solutions":["Re-run with a supported provider: registry, task/release, or github/gh","Check `f release --help` for the exact accepted subcommand names","If a script/alias passes the provider, fix the script's argument"],"exampleFix":"// before\nf release gitub\n// after\nf release github","handlingStrategy":"validation","validationCode":"const PROVIDERS = [\"registry\", \"task\", \"release\", \"github\", \"gh\"];\nfunction isValidReleaseProvider(p) {\n  return PROVIDERS.includes(p);\n}\nif (!isValidReleaseProvider(args.provider)) throw new Error(`unsupported provider: ${args.provider}`);","typeGuard":"function isReleaseProvider(p: string): p is \"registry\" | \"task\" | \"release\" | \"github\" | \"gh\" {\n  return [\"registry\", \"task\", \"release\", \"github\", \"gh\"].includes(p);\n}","tryCatchPattern":"try {\n  run([\"f\", \"release\", provider]);\n} catch (e) {\n  if (String(e).includes(\"Unknown release provider\")) {\n    console.error(`Invalid provider '${provider}'. Use registry|task|release|github|gh.`);\n  } else throw e;\n}","preventionTips":["Keep provider names in a shared constant list used by both scripts and the CLI","Use shell completion or --help to pick valid subcommands","Validate CLI arguments in wrapper scripts before invoking `f release`"],"tags":["cli","release","invalid-argument"],"backgroundTag":"unknown-subcommand","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}