{"record":{"id":"a80030f1d1ac78c0","repo":"nikivdev/code","slug":"no-domain-configured-use-url-to-specify-a-url-t","errorCode":null,"errorMessage":"No domain configured. Use --url to specify a URL to check.","messagePattern":"No domain configured\\. Use --url to specify a URL to check\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/deploy.rs","lineNumber":3137,"sourceCode":"fn check_health(\n    _project_root: &Path,\n    config: Option<&Config>,\n    custom_url: Option<String>,\n    expected_status: u16,\n) -> Result<()> {\n    use std::time::Instant;\n\n    // Determine URL to check\n    let url = if let Some(url) = custom_url {\n        url\n    } else if let Some(config) = config {\n        // 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);","sourceCodeStart":3119,"sourceCodeEnd":3155,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/deploy.rs#L3119-L3155","documentation":"The health-check command resolves the URL to probe from the project config. A [host] section exists, but its `domain` field is missing, so the URL cannot be constructed from host + ssl scheme. The CLI bails instead of guessing a domain.","triggerScenarios":"Running the health check when flow.toml has a [host] section with ssl but no `domain` key, and no --url flag and no [cloudflare].url fallback is provided.","commonSituations":"Hand-written flow.toml where the user set host.ssl = true but forgot host.domain; config migrated from another tool that dropped the domain field.","solutions":["Add `domain = \"example.com\"` under [host] in flow.toml","Pass --url https://example.com on the command line","Configure [cloudflare] url = \"https://...\" as a fallback"],"exampleFix":"// before (flow.toml)\n[host]\nssl = true\n\n// after\n[host]\nssl = true\ndomain = \"example.com\"","handlingStrategy":"validation","validationCode":"// Rust, before invoking the check\nlet cfg = load_config()?;\nif cfg.host.as_ref().map_or(true, |h| h.domain.is_none())\n    && cfg.cloudflare.as_ref().map_or(true, |c| c.url.is_none())\n    && std::env::args().all(|a| a != \"--url\") {\n    eprintln!(\"fix flow.toml [host].domain or pass --url\");\n}","typeGuard":"fn has_checkable_url(cfg: &Config, has_url_flag: bool) -> bool {\n    has_url_flag\n        || cfg.host.as_ref().is_some_and(|h| h.domain.is_some())\n        || cfg.cloudflare.as_ref().is_some_and(|c| c.url.is_some())\n}","tryCatchPattern":null,"preventionTips":["Always set host.domain together with host.ssl in flow.toml","Keep [cloudflare].url as a documented fallback","Validate flow.toml with the CLI's config check before deploying"],"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-08T15:18:49.778Z"}