forked from Silverfish/proton-bridge
refactor: return ErrNoSuchAPIID any time we get 422
This commit is contained in:
@ -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.apiClient.GetMessage(message.ID); err != nil {
|
||||
if err == pmapi.ErrNoSuchMessage {
|
||||
if err == pmapi.ErrNoSuchAPIID {
|
||||
msgLog.WithError(err).Warn("Skipping message update because message exists neither in local DB nor on API")
|
||||
err = nil
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user