diff --git a/x-pack/elastic-agent/pkg/agent/application/application.go b/x-pack/elastic-agent/pkg/agent/application/application.go index c13157e02f5..c88cca8fc3c 100644 --- a/x-pack/elastic-agent/pkg/agent/application/application.go +++ b/x-pack/elastic-agent/pkg/agent/application/application.go @@ -78,6 +78,9 @@ func createApplication( // not in standalone; both modes require reading the fleet.yml configuration file var store storage.Store store, cfg, err = mergeFleetConfig(rawConfig) + if err != nil { + return nil, err + } if IsFleetServerBootstrap(cfg.Fleet) { log.Info("Agent is in Fleet Server bootstrap mode")