From 7298e8fd04d58844d2c0fd11051318b392c02ecd Mon Sep 17 00:00:00 2001 From: Jaime Martinez Date: Wed, 7 Apr 2021 15:11:04 +1000 Subject: [PATCH] Log connection attempt errors Changelog: added --- internal/source/gitlab/gitlab_poll.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/source/gitlab/gitlab_poll.go b/internal/source/gitlab/gitlab_poll.go index 0284449a7..117216d7b 100644 --- a/internal/source/gitlab/gitlab_poll.go +++ b/internal/source/gitlab/gitlab_poll.go @@ -23,7 +23,12 @@ func (g *Gitlab) poll(interval, maxElapsedTime time.Duration) { operation := func() error { log.Info("Checking GitLab internal API availability") - return g.client.Status() + err := g.client.Status() + if err != nil { + log.WithError(err).Warn("attempted to connect to the API") + } + + return err } err := backoff.Retry(operation, backOff) -- GitLab