From 9651f9467ef759a90ae343849187fc4bf465ff77 Mon Sep 17 00:00:00 2001 From: Matt Gleich Date: Tue, 3 Dec 2024 14:31:28 -0500 Subject: [PATCH] fix: compare actual error message when checking if error is warning error Signed-off-by: Matt Gleich --- internal/cache/cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cache/cache.go b/internal/cache/cache.go index 8ee1702..8493c86 100644 --- a/internal/cache/cache.go +++ b/internal/cache/cache.go @@ -101,7 +101,7 @@ func (c *Cache[T]) StartPeriodicUpdate(updateFunc func() (T, error), interval ti defer ticker.Stop() for range ticker.C { data, err := updateFunc() - if err != nil && err != apis.WarningError { + if err != nil && err.Error() != apis.WarningError.Error() { lumber.Error(err, "updating", c.name, "cache failed") continue }