Skip to content

Commit

Permalink
fix: compare actual error message when checking if error is warning e…
Browse files Browse the repository at this point in the history
…rror

Signed-off-by: Matt Gleich <[email protected]>
  • Loading branch information
gleich committed Dec 3, 2024
1 parent 815bee6 commit 9651f94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 9651f94

Please sign in to comment.