Align error behaviour for invalid web config path with invalid asset path

This commit is contained in:
Benedikt Kulmann committed 2020-08-13 15:36:35 +02:00
1 parent 923fd5a3f3
commit 73727e8fb6
1 file changed
+4 -6
+4 -6
View File
@@ -79,21 +79,19 @@ func (p Phoenix) getPayload() (payload []byte, err error) {
// try loading from file
if _, err = os.Stat(p.config.Phoenix.Path); os.IsNotExist(err) {
p.logger.Error().
p.logger.Fatal().
Err(err).
Str("config", p.config.Phoenix.Path).
Msg("Phoenix config doesn't exist")
return
Msg("phoenix config doesn't exist")
}
payload, err = ioutil.ReadFile(p.config.Phoenix.Path)
if err != nil {
p.logger.Error().
p.logger.Fatal().
Err(err).
Str("config", p.config.Phoenix.Path).
Msg("Failed to read custom config")
Msg("failed to read custom config")
}
return
}