fix(config): improve validation error messages for edge_connect config
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:
parent
b8c6381844
commit
4814d854ee
1 changed files with 2 additions and 2 deletions
|
|
@ -28,7 +28,7 @@ func NewConfig(cfgFile string) (*Config, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := config.Validate(); err != nil {
|
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
|
return &config, nil
|
||||||
}
|
}
|
||||||
|
|
@ -72,7 +72,7 @@ func (c *Config) Validate() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.EdgeConnect.URL == "" {
|
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
|
return nil
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue