{"record":{"id":"4622a36d722a3cbe","repo":"nikivdev/code","slug":"deploy-task-not-found-available-tasks","errorCode":null,"errorMessage":"deploy_task '{}' not found. Available tasks: {}","messagePattern":"deploy_task '(.+?)' not found\\. Available tasks: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/deploy.rs","lineNumber":347,"sourceCode":"        flow_config,\n    } = ctx;\n\n    match action {\n        None => {\n            // Auto-detect platform from flow.toml, or run deploy task if configured.\n            if let Some(cfg) = flow_config.as_ref() {\n                if let Some(task_name) = cfg.flow.deploy_task.as_deref() {\n                    if tasks::find_task(cfg, task_name).is_some() {\n                        return tasks::run(TaskRunOpts {\n                            config: config_path,\n                            delegate_to_hub: false,\n                            hub_host: std::net::IpAddr::from([127, 0, 0, 1]),\n                            hub_port: 9050,\n                            name: task_name.to_string(),\n                            args: Vec::new(),\n                        });\n                    }\n                    bail!(\n                        \"deploy_task '{}' not found. Available tasks: {}\",\n                        task_name,\n                        available_tasks(cfg)\n                    );\n                }\n\n                if cfg.host.is_some() || cfg.cloudflare.is_some() || cfg.railway.is_some() {\n                    return auto_deploy(&project_root, Some(cfg));\n                }\n                if tasks::find_task(cfg, \"deploy\").is_some() {\n                    return tasks::run(TaskRunOpts {\n                        config: config_path,\n                        delegate_to_hub: false,\n                        hub_host: std::net::IpAddr::from([127, 0, 0, 1]),\n                        hub_port: 9050,\n                        name: \"deploy\".to_string(),\n                        args: Vec::new(),\n                    });","sourceCodeStart":329,"sourceCodeEnd":365,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/deploy.rs#L329-L365","documentation":"run_with_project_context in src/deploy.rs was asked (via `f deploy <task>` or a fallback path) to run a deploy_task by name that is not defined in flow.toml. The error lists the tasks that ARE available (available_tasks(cfg)) so the caller can correct the name. It is thrown instead of silently guessing a task.","triggerScenarios":"Invoking `f deploy <name>` where <name> matches no [deploy_task.<name>] entry in flow.toml; typo in the task name; task defined in a different config file or removed in a refactor.","commonSituations":"Typo like `f deploy produtcion`; following old docs before the task was renamed; working in a repo copy where flow.toml lacks the custom task a teammate defined locally.","solutions":["Read the 'Available tasks:' list in the error and re-run with an exact task name.","Add the missing task to flow.toml, e.g. `[deploy_task.mytask]` with the desired command.","Run `f deploy` with no task to use the default deploy path instead of a named task."],"exampleFix":"# before\n$ f deploy deply-staging\ndeploy_task 'deply-staging' not found. Available tasks: deploy-staging\n# after\n$ f deploy deploy-staging","handlingStrategy":"validation","validationCode":"// Shell: list tasks and verify the name exists before invoking\nTASKS=$(grep -E '^\\[deploy_task\\.' flow.toml | sed 's/\\[deploy_task\\.\\(.*\\)\\]/\\1/')\necho \"$TASKS\" | grep -qx \"$1\" || { echo \"task '$1' not in flow.toml; available: $TASKS\"; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy task names from `f deploy` help/available-tasks output, not from memory.","Keep deploy task names in team docs or Makefile aliases to avoid typos.","Grep flow.toml for `deploy_task.` sections before scripting deploy calls.","After renaming tasks, grep scripts/CI for the old name."],"tags":["config","task-not-found","cli"],"backgroundTag":"missing-config-entry","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}