From c9ef4c6ccb25a03c54325cd2a8bfa524dfb06c7f Mon Sep 17 00:00:00 2001 From: Itxaka Date: Thu, 11 Sep 2025 14:26:11 +0200 Subject: [PATCH] fix: adjust error handling in collector (#622) --- collector/collector.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/collector/collector.go b/collector/collector.go index 49a619c..5fa94aa 100644 --- a/collector/collector.go +++ b/collector/collector.go @@ -457,19 +457,12 @@ func fetchRemoteConfig(url string) (*Config, error) { ) if err != nil { - // TODO: improve logging - fmt.Printf("WARNING: Couldn't fetch config_url: %s", err) + // TODO: This keeps the old behaviour but IMHO we should return an error here return result, nil } if !HasValidHeader(string(body)) { - // TODO: Print a warning when we implement proper logging - if err != nil { - fmt.Printf("No valid header in remote config: %s\n", err.Error()) - } else { - fmt.Println("No valid header in remote config") - } - + // TODO: This keeps the old behaviour but IMHO we should return an error here return result, nil }