Skip to content

Commit 6ec7add

Browse files
authored
Improve pormetheus error message (#60)
Signed-off-by: Raul Sevilla <[email protected]>
1 parent e43a8c5 commit 6ec7add

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

prometheus/prometheus.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,8 @@ func (p *Prometheus) QueryRange(query string, start, end time.Time, step time.Du
8989
// Verifies prometheus connection
9090
func (p *Prometheus) verifyConnection() error {
9191
_, err := p.Query("up{}", time.Now().UTC().UTC())
92-
return err
92+
if err != nil {
93+
return fmt.Errorf("error verifying prometheus connection: %s", err)
94+
}
95+
return nil
9396
}

0 commit comments

Comments
 (0)