Skip to content

Commit

Permalink
fix: confusing error msg for missing .ergo file (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoliveira authored Mar 31, 2024
1 parent 3b8840f commit 0f866bb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@ func main() {
err := config.LoadServices()
if err != nil {
// We will only inform the error but continue running the proxy
log.Println("-------------MISSING CONFIG FILE---------------")
log.Println("Please make sure a file named `.ergo` is present in this path:")
log.Printf("Config file path: %s\r\n", config.ConfigFile)
log.Printf("Error: %s\r\n", err.Error())
}

Expand Down
2 changes: 1 addition & 1 deletion proxy/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (c *Config) WatchConfigFile(tickerChan <-chan time.Time) {
func readServicesFromFile(filepath string) ([]Service, error) {
file, err := os.Open(filepath)
if err != nil {
return nil, fmt.Errorf("file error: %v", err)
return nil, fmt.Errorf("issue while reading config (%s) file cause: %v", filepath, err)
}
defer file.Close()

Expand Down

0 comments on commit 0f866bb

Please sign in to comment.