be less noisy about rate limits

This commit is contained in:
Andre Medeiros 2022-05-19 11:51:56 -04:00
parent 527552eb6d
commit cc6e862ba6
2 changed files with 6 additions and 4 deletions

View file

@ -255,7 +255,7 @@ func (nc *notificationsConsumer) Consume(delivery rmq.Delivery) {
if err != nil {
switch err {
case reddit.ErrTimeout: // Don't log timeouts
case reddit.ErrTimeout, reddit.ErrRateLimited: // Don't log timeouts or rate limits
break
case reddit.ErrOauthRevoked:
err = nc.deleteAccount(account)

View file

@ -152,9 +152,11 @@ func (snc *stuckNotificationsConsumer) Consume(delivery rmq.Delivery) {
things, err = rac.MessageInbox(snc)
if err != nil {
if err != reddit.ErrRateLimited {
snc.logger.WithFields(logrus.Fields{
"err": err,
}).Error("failed to fetch last thing via inbox")
}
return
}
} else {