{"record":{"id":"b24eb560fca149c3","repo":"nikivdev/code","slug":"multiple-cloudflare-worker-configs-found-set-clo","errorCode":null,"errorMessage":"Multiple Cloudflare worker configs found. Set [cloudflare].path in flow.toml.","messagePattern":"Multiple Cloudflare worker configs found\\. Set \\[cloudflare\\]\\.path in flow\\.toml\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/deploy.rs","lineNumber":1500,"sourceCode":"\nfn setup_cloudflare(project_root: &Path, config: Option<&Config>) -> Result<()> {\n    let default_cf = CloudflareConfig::default();\n    let cf_cfg = config\n        .and_then(|c| c.cloudflare.as_ref())\n        .unwrap_or(&default_cf);\n\n    if is_cloud_source(cf_cfg.env_source.as_deref()) {\n        let worker_path = if let Some(path) = cf_cfg.path.as_ref() {\n            project_root.join(path)\n        } else {\n            let workers = discover_wrangler_configs(project_root)?;\n            if workers.is_empty() {\n                println!(\"No Cloudflare Worker config found (wrangler.toml/json).\");\n                println!(\"Run `wrangler init` first, then try: f deploy setup\");\n                return Ok(());\n            }\n            if workers.len() > 1 {\n                bail!(\n                    \"Multiple Cloudflare worker configs found. Set [cloudflare].path in flow.toml.\"\n                );\n            }\n            workers[0].clone()\n        };\n\n        ensure_wrangler_config(&worker_path)?;\n        println!(\"Using Cloudflare worker: {}\", worker_path.display());\n\n        let env_name = cf_cfg\n            .environment\n            .clone()\n            .unwrap_or_else(|| \"production\".to_string());\n        maybe_bootstrap_secrets(&worker_path, cf_cfg, &env_name)?;\n        let keys = collect_cloudflare_env_keys(cf_cfg);\n        let env_store_ok = if keys.is_empty() {\n            true\n        } else {","sourceCodeStart":1482,"sourceCodeEnd":1518,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/deploy.rs#L1482-L1518","documentation":"Error \"Multiple Cloudflare worker configs found. Set [cloudflare].path in flow.toml.\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/deploy.rs:1500 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}