affaan-m/ECC · error
connector name required unless --all is set
Error message
connector name required unless --all is set
What it means
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.
Source
Thrown at ecc2/src/main.rs:2493
);
}
}
GraphCommands::ConnectorSync {
name,
all,
limit,
json,
} => {
if all {
let report = sync_all_memory_connectors(&db, &cfg, limit)?;
if json {
println!("{}", serde_json::to_string_pretty(&report)?);
} else {
println!("{}", format_graph_connector_sync_report_human(&report));
}
} else {
let name = name.as_deref().ok_or_else(|| {
anyhow::anyhow!("connector name required unless --all is set")
})?;
let stats = sync_memory_connector(&db, &cfg, name, limit)?;
if json {
println!("{}", serde_json::to_string_pretty(&stats)?);
} else {
println!("{}", format_graph_connector_sync_stats_human(&stats));
}
}
}
GraphCommands::Connectors { json } => {
let report = memory_connector_status_report(&db, &cfg)?;
if json {
println!("{}", serde_json::to_string_pretty(&report)?);
} else {
println!("{}", format_graph_connector_status_report_human(&report));
}
}
GraphCommands::Recall {View on GitHub (pinned to 01e15490f0)
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.
Example fix
// before ecc graph connectors sync // after ecc graph connectors sync my-jsonl-connector # or: --all
Defensive patterns
Strategy: validation
Validate before calling
// Decide on a connector or --all before invoking sync
fn resolve_sync_target(name: Option<&str>, all: bool) -> Result<SyncTarget, String> {
match (all, name) {
(true, _) => Ok(SyncTarget::All),
(false, Some(n)) => Ok(SyncTarget::One(n.to_string())),
(false, None) => Err("connector name required unless --all is set".into()),
}
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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).
Related errors
- graph sync does not accept a session ID when --all is set
- Unknown memory connector: {name}
- ${label} must be a positive integer
- Unknown install target: ${parsed.target}. Expected one of ${
- Consult requires a natural language query, for example: secu
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/bb347ffacb70ce97.
Report an issue: GitHub.