Say which config client control could not find a profile in - #100
Merged
Merged
Conversation
A bare `flextunnel client control` under the systemd template layout (docs/systemd.md: one `<instance>.toml` per unit, no `client.toml`) failed with "The profile has no server node id (set server_node_id in the config or pass -n)" — blaming a profile that was never found, since the default config does not exist at all. Split that into the three cases it was covering: an explicit -c file with no server_node_id (name that file), a default client.toml with no server_node_id (name it, and mention -c), and no config file at all (say so, and list the *.toml profiles that are in the config dir, which is exactly the set of systemd instances). Also drop the .context() that wrapped genuine read/parse failures with "client control needs a profile", and expose config::default_client_config_path() so the path can be named in the errors. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017qaKrfofmiVWdkXnyjubXF
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017qaKrfofmiVWdkXnyjubXF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A bare
flextunnel client controlunder the systemd template layout (docs/systemd.md: one<instance>.tomlper unit, noclient.toml) failed with:which blames a profile that was never found — the default config does not exist at all in that layout.
What changed
client controlnow reports the three cases separately:-c <file>with noserver_node_id— names that file.client.tomlwith noserver_node_id— names it, and mentions-cfor another profile.*.tomlprofiles found in~/.config/flextunnel(exactly the set of systemd instances):.context()that wrapped genuine read/parse failures with "client control needs a profile", hiding the real reason.config::default_client_config_path()so the default path can be named in errors.docs/systemd.md: note that-cis not optional under the template layout.Testing
cargo clippy --workspace --all-targetsclean;cargo test --workspacepasses, including three newtuitests.🤖 Generated with Claude Code
https://claude.ai/code/session_017qaKrfofmiVWdkXnyjubXF