From e0cd1994fd85a69a4844d413f134edff7dfc7988 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 13 May 2025 17:23:53 +0200 Subject: [PATCH] feat(assist): correct 'empty list error' handler --- ee/backend/pkg/assist/service/stats.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ee/backend/pkg/assist/service/stats.go b/ee/backend/pkg/assist/service/stats.go index 475b27d3d..ad32146ac 100644 --- a/ee/backend/pkg/assist/service/stats.go +++ b/ee/backend/pkg/assist/service/stats.go @@ -75,7 +75,11 @@ func (as *assistStatsImpl) loadData() { events, err := as.redisClient.LPopCount(ctx, "assist:stats", 1000).Result() if err != nil { - as.log.Error(ctx, "Failed to load data from redis: ", err) + if errors.Is(err, redis.Nil) { + as.log.Debug(ctx, "No data to load from redis") + } else { + as.log.Error(ctx, "Failed to load data from redis: ", err) + } return } if len(events) == 0 {