{"record":{"id":"5c2ca69a474c1f81","repo":"nikivdev/code","slug":"no-deployment-config-found-use-url-to-specify-a","errorCode":null,"errorMessage":"No deployment config found. Use --url to specify a URL to check.","messagePattern":"No deployment config found\\. Use --url to specify a URL to check\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/deploy.rs","lineNumber":3149,"sourceCode":"        // Try host domain first\n        if let Some(host) = &config.host {\n            if let Some(domain) = &host.domain {\n                let scheme = if host.ssl { \"https\" } else { \"http\" };\n                format!(\"{}://{}\", scheme, domain)\n            } else {\n                bail!(\"No domain configured. Use --url to specify a URL to check.\");\n            }\n        } else if let Some(cf) = &config.cloudflare {\n            // Use configured URL if present\n            if let Some(cf_url) = &cf.url {\n                cf_url.clone()\n            } else {\n                bail!(\n                    \"No URL configured in [cloudflare]. Add 'url = \\\"https://...\\\"' or use --url.\"\n                );\n            }\n        } else {\n            bail!(\"No deployment config found. Use --url to specify a URL to check.\");\n        }\n    } else {\n        bail!(\"No flow.toml found. Use --url to specify a URL to check.\");\n    };\n\n    println!(\"Checking health: {}\", url);\n    let start = Instant::now();\n\n    // Use curl for simplicity (available everywhere)\n    let output = Command::new(\"curl\")\n        .args([\n            \"-sS\",\n            \"-o\",\n            \"/dev/null\",\n            \"-w\",\n            \"%{http_code}\",\n            \"--max-time\",\n            \"10\",","sourceCodeStart":3131,"sourceCodeEnd":3167,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/deploy.rs#L3131-L3167","documentation":"The config loaded (flow.toml exists) but contains neither a [host] nor a [cloudflare] section, so no deployment target is defined and no URL can be derived for the health check.","triggerScenarios":"Running the health check in a project whose flow.toml has other sections only (build, deps, etc.) with no deployment config, and no --url flag.","commonSituations":"Freshly initialized flow.toml before the first deploy; project converted from another deploy tool; sections renamed/typos like [cloud_flare].","solutions":["Pass --url https://... to check a specific URL","Add a [host] section with `domain` (and optional `ssl`) to flow.toml","Add a [cloudflare] section with `url` to flow.toml"],"exampleFix":"// before (flow.toml)\n[build]\ncommand = \"npm run build\"\n\n// after\n[build]\ncommand = \"npm run build\"\n\n[host]\ndomain = \"example.com\"\nssl = true","handlingStrategy":"validation","validationCode":"if config.host.is_none() && config.cloudflare.is_none() {\n    eprintln!(\"add [host] or [cloudflare] section to flow.toml (or pass --url)\");\n    std::process::exit(1);\n}","typeGuard":"fn has_deploy_target(cfg: &Config) -> bool {\n    cfg.host.is_some() || cfg.cloudflare.is_some()\n}","tryCatchPattern":null,"preventionTips":["Run a config lint/init step that requires a deployment section","Keep flow.toml sections canonical; watch for typos in section names","Always pass --url for ad-hoc checks against unconfigured projects"],"tags":["config","deployment","health-check"],"backgroundTag":"missing-config-field","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}