From 458382f3b8004adbb536ebf2e467f4c3114c62b4 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Wed, 2 Nov 2022 01:28:15 -0400 Subject: [PATCH] be selective in what error we return --- internal/worker/stuck_notifications.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/worker/stuck_notifications.go b/internal/worker/stuck_notifications.go index 8b9eb55..475b95e 100644 --- a/internal/worker/stuck_notifications.go +++ b/internal/worker/stuck_notifications.go @@ -85,13 +85,15 @@ func (snw *stuckNotificationsWorker) Process(ctx context.Context, args ...interf things, err = rac.MessageInbox(ctx) if err != nil { - if err != reddit.ErrRateLimited { + if err != reddit.ErrRateLimited && err != reddit.ErrOauthRevoked { snw.logger.Error("failed to fetch last thing via inbox", zap.Error(err), zap.String("account#reddit_account_id", id), zap.String("account#username", account.NormalizedUsername()), ) + return err } + return nil } } else {