We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05277cc commit 5344362Copy full SHA for 5344362
configuration/configuration.go
@@ -231,7 +231,11 @@ func (c *Configuration) Load() error {
231
c.storage = &StorageHCL{}
232
}
233
if err = c.storage.Load(c.HAProxy.DataplaneConfig); err != nil {
234
- log.Warnf("configuration file %s does not exists, creating one", c.HAProxy.DataplaneConfig)
+ if os.IsNotExist(err) {
235
+ log.Warnf("configuration file %s does not exists, creating one", c.HAProxy.DataplaneConfig)
236
+ } else {
237
+ return fmt.Errorf("configuration file %s not valid: %w", c.HAProxy.DataplaneConfig, err)
238
+ }
239
240
241
copyToConfiguration(c)
0 commit comments