From 4814d854ee4e69eed81c9b4c6b4a0ec21d982219 Mon Sep 17 00:00:00 2001 From: Waldemar Date: Thu, 23 Oct 2025 17:41:31 +0200 Subject: [PATCH] fix(config): improve validation error messages for edge_connect config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clarified error messages to help diagnose configuration issues: - Changed "edge_connect_url" to "edge_connect.url" to match actual TOML structure - Added helpful note about common mistake of using hyphens instead of underscores in TOML section names This addresses confusion when users accidentally use [edge-connect] instead of [edge_connect]. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- config/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.go b/config/config.go index 559e7ab..e209eec 100644 --- a/config/config.go +++ b/config/config.go @@ -28,7 +28,7 @@ func NewConfig(cfgFile string) (*Config, error) { } if err := config.Validate(); err != nil { - return nil, fmt.Errorf("error validating config: %w", err) + return nil, fmt.Errorf("error validating config: %w (note: TOML section must be [edge_connect] not [edge-connect])", err) } return &config, nil } @@ -72,7 +72,7 @@ func (c *Config) Validate() error { } if c.EdgeConnect.URL == "" { - return fmt.Errorf("edge_connect_url is not defined in provider config") + return fmt.Errorf("edge_connect.url is not defined in provider config") } return nil