fix: Wrap error properly (%s -> %w)

This commit is contained in:
TwiN 2022-11-12 14:56:25 -05:00
parent 861c443842
commit 64f4dac705

View File

@ -268,7 +268,7 @@ func validateEndpointsConfig(config *Config) error {
log.Printf("[config][validateEndpointsConfig] Validating endpoint '%s'", endpoint.Name) log.Printf("[config][validateEndpointsConfig] Validating endpoint '%s'", endpoint.Name)
} }
if err := endpoint.ValidateAndSetDefaults(); err != nil { if err := endpoint.ValidateAndSetDefaults(); err != nil {
return fmt.Errorf("invalid endpoint %s: %s", endpoint.DisplayName(), err) return fmt.Errorf("invalid endpoint %s: %w", endpoint.DisplayName(), err)
} }
} }
log.Printf("[config][validateEndpointsConfig] Validated %d endpoints", len(config.Endpoints)) log.Printf("[config][validateEndpointsConfig] Validated %d endpoints", len(config.Endpoints))