fix(config): improve validation error messages for edge_connect config
Some checks failed
build / build (push) Successful in 1m13s
Go Tests / go-tests (push) Failing after 1m13s

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 <noreply@anthropic.com>
This commit is contained in:
Waldemar 2025-10-23 17:41:31 +02:00
parent b8c6381844
commit 4814d854ee
Signed by: waldemar.kindler
SSH key fingerprint: SHA256:wlTo/iRV2dOcNfLJPdlwSsLvA1BH+gT9449nlU9sHXo

View file

@ -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