{"record":{"id":"bb347ffacb70ce97","repo":"affaan-m/ECC","slug":"connector-name-required-unless-all-is-set","errorCode":null,"errorMessage":"connector name required unless --all is set","messagePattern":"connector name required unless --all is set","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ecc2/src/main.rs","lineNumber":2493,"sourceCode":"                    );\n                }\n            }\n            GraphCommands::ConnectorSync {\n                name,\n                all,\n                limit,\n                json,\n            } => {\n                if all {\n                    let report = sync_all_memory_connectors(&db, &cfg, limit)?;\n                    if json {\n                        println!(\"{}\", serde_json::to_string_pretty(&report)?);\n                    } else {\n                        println!(\"{}\", format_graph_connector_sync_report_human(&report));\n                    }\n                } else {\n                    let name = name.as_deref().ok_or_else(|| {\n                        anyhow::anyhow!(\"connector name required unless --all is set\")\n                    })?;\n                    let stats = sync_memory_connector(&db, &cfg, name, limit)?;\n                    if json {\n                        println!(\"{}\", serde_json::to_string_pretty(&stats)?);\n                    } else {\n                        println!(\"{}\", format_graph_connector_sync_stats_human(&stats));\n                    }\n                }\n            }\n            GraphCommands::Connectors { json } => {\n                let report = memory_connector_status_report(&db, &cfg)?;\n                if json {\n                    println!(\"{}\", serde_json::to_string_pretty(&report)?);\n                } else {\n                    println!(\"{}\", format_graph_connector_status_report_human(&report));\n                }\n            }\n            GraphCommands::Recall {","sourceCodeStart":2475,"sourceCodeEnd":2511,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/ecc2/src/main.rs#L2475-L2511","documentation":"Thrown by the `graph connectors sync` subcommand when `--all` is not set and no connector `name` was supplied. Without `--all`, the command needs a single connector name to look up in `cfg.memory_connectors`; `name.as_deref()` returns `None` and the `ok_or_else` converts it to an error. The message tells the user exactly which flag would satisfy the requirement.","triggerScenarios":"Running `ecc graph connectors sync` with neither a positional name nor `--all`. A wrapper that strips arguments and ends up calling the command bare. A TUI/REPL that dispatches the sync action without forwarding the selected connector name.","commonSituations":"New users exploring the CLI who forget the connector argument. Misconfigured automation that assumes a default connector exists. Renamed connectors in config making a hardcoded name resolve to nothing (different error, but often preceded by this one when the name is also dropped).","solutions":["Provide a connector name: `ecc graph connectors sync <name>`.","Or sync every configured connector: `ecc graph connectors sync --all`.","List configured connectors first with `ecc graph connectors` to pick a valid name."],"exampleFix":"// before\necc graph connectors sync\n\n// after\necc graph connectors sync my-jsonl-connector   # or: --all","handlingStrategy":"validation","validationCode":"// Decide on a connector or --all before invoking sync\nfn resolve_sync_target(name: Option<&str>, all: bool) -> Result<SyncTarget, String> {\n    match (all, name) {\n        (true, _) => Ok(SyncTarget::All),\n        (false, Some(n)) => Ok(SyncTarget::One(n.to_string())),\n        (false, None) => Err(\"connector name required unless --all is set\".into()),\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Make `name` a required clap argument unless `--all` is set (use `required_unless_present_all = [\"all\"]`).","Default interactive flows to listing connectors when no argument is given.","Document that exactly one of `<name>` / `--all` is mandatory."],"tags":["cli","connector","memory","graph","validation"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}