feat: add ErrNoSuchMessage to pmapi

This commit is contained in:
James Houlahan
2020-04-16 17:32:30 +02:00
committed by Jakub Cuth
parent d1e63254f2
commit e1ecc11f38
5 changed files with 12 additions and 1 deletions

View File

@ -431,7 +431,7 @@ func (loop *eventLoop) processMessages(eventLog *logrus.Entry, messages []*pmapi
msgLog.WithError(err).Warning("Message was not present in DB. Trying fetch...")
if msg, err = loop.store.fetchMessage(message.ID); err != nil {
if err != pmapi.ErrAPINotReachable {
if err == pmapi.ErrNoSuchMessage {
msgLog.WithError(err).Warn("Skipping message update because message exists neither in local DB nor on API")
err = nil
continue