From 20dad2ffa4830d583bcf01e7569bd25c658286c2 Mon Sep 17 00:00:00 2001 From: kim Date: Mon, 15 Jan 2024 21:07:38 +0000 Subject: [PATCH] fix error checking --- internal/media/refetch.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/media/refetch.go b/internal/media/refetch.go index 6554204e16..8e5188178b 100644 --- a/internal/media/refetch.go +++ b/internal/media/refetch.go @@ -53,8 +53,10 @@ func (m *Manager) RefetchEmojis(ctx context.Context, domain string, dereferenceM for { // Fetch next block of emojis from database emojis, err := m.state.DB.GetEmojisBy(ctx, domain, false, true, "", maxShortcodeDomain, "", 20) - if err != nil && !errors.Is(err, db.ErrNoEntries) { - log.Errorf(ctx, "error fetching emojis from database: %s", err) + if err != nil { + if !errors.Is(err, db.ErrNoEntries) { + log.Errorf(ctx, "error fetching emojis from database: %s", err) + } break }