Skip to content

Commit

Permalink
DEV-1074: fix a bag in error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Toktar committed Apr 20, 2022
1 parent 24c31bb commit 60b8005
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func main() {
viper.SetConfigFile(".env")
err2 := viper.ReadInConfig()
if err1 != nil && err2 != nil { // Handle errors reading the config file
panic(fmt.Errorf("Fatal error config file: %w \n Fatal error config file: %w\n", err1, err2))
panic(fmt.Errorf("Fatal error config file: %s \n Fatal error config file: %s\n", err1.Error(), err2.Error()))
}

viper.AutomaticEnv()
Expand Down

0 comments on commit 60b8005

Please sign in to comment.