{"record":{"id":"f8351d411ce42d80","repo":"nikivdev/code","slug":"no-proxy-targets-configured-add-proxies-to-fl","errorCode":null,"errorMessage":"No proxy targets configured. Add [[proxies]] to flow.toml","messagePattern":"No proxy targets configured\\. Add \\[\\[proxies\\]\\] to flow\\.toml","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/main.rs","lineNumber":1049,"sourceCode":"                .map(|d| d.join(\"flow\").join(\"flow.toml\"))\n                .filter(|p| p.exists());\n            if let Some(path) = global {\n                flowd::config::load(&path)\n            } else {\n                bail!(\"No flow.toml found in current directory or global config\");\n            }\n        }\n    };\n\n    match cmd.action {\n        ProxyAction::Start(opts) => {\n            // Load config\n            let config = load_project_config()?;\n            let proxy_config = config.proxy.unwrap_or_default();\n            let targets = config.proxies;\n\n            if targets.is_empty() {\n                bail!(\"No proxy targets configured. Add [[proxies]] to flow.toml\");\n            }\n\n            // Override listen if provided\n            let proxy_config = if let Some(listen) = opts.listen {\n                proxy::ProxyConfig {\n                    listen,\n                    ..proxy_config\n                }\n            } else {\n                proxy_config\n            };\n\n            // Start server\n            let rt = tokio::runtime::Runtime::new()?;\n            rt.block_on(proxy::start(proxy_config, targets))?;\n        }\n        ProxyAction::Trace(opts) => {\n            proxy::trace_last(opts.count)?;","sourceCodeStart":1031,"sourceCodeEnd":1067,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/main.rs#L1031-L1067","documentation":"The `proxy` subcommand requires at least one [[proxies]] target entry in the project's flow.toml. load_project_config succeeded but `config.proxies` was empty (or absent), so there is nothing to proxy. This is a deliberate configuration guard, not a runtime failure.","triggerScenarios":"Running `f proxy` (proxy_command via main) when flow.toml has no [[proxies]] table/array entries, or flow.toml is missing entirely and no proxies were declared.","commonSituations":"Fresh project where the user only set [proxy] listen options but forgot the [[proxies]] targets; typos in the TOML key (e.g. [[proxy]] singular) that silently parse as a different field.","solutions":["Add at least one [[proxies]] entry with target/host fields to flow.toml.","Verify the TOML key is exactly [[proxies]] (plural, double brackets for array-of-tables).","Confirm you are running `f proxy` from the project root so load_project_config finds the right flow.toml."],"exampleFix":"// before (flow.toml)\n[proxy]\nlisten = \"127.0.0.1:8080\"\n\n// after\n[proxy]\nlisten = \"127.0.0.1:8080\"\n\n[[proxies]]\nfrom = \"api.example.com\"\nto = \"http://localhost:3000\"","handlingStrategy":"validation","validationCode":"let config = load_project_config()?;\nif config.proxies.as_ref().map_or(true, |p| p.is_empty()) {\n    eprintln!(\"flow.toml has no [[proxies]] entries; `f proxy` will fail\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep a [[proxies]] block in the project's flow.toml template.","Lint flow.toml in CI: parse it and assert required keys (proxies non-empty) for proxy-enabled projects.","Remember the key must be the plural array-of-tables [[proxies]]."],"tags":["config","toml","proxy"],"backgroundTag":"missing-config-entry","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}