Skip to content

Commit

Permalink
fix error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
NyaaaWhatsUpDoc committed Jan 19, 2024
1 parent a363575 commit 20dad2f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/media/refetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 20dad2f

Please sign in to comment.