Log more information when a device list update fails

This commit is contained in:
Neil Alexander 2022-06-15 14:11:03 +01:00
parent fd531aea01
commit c0f2ae3c75
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -70,7 +70,12 @@ func (t *DeviceListUpdateConsumer) onMessage(ctx context.Context, msg *nats.Msg)
}
err := t.updater.Update(ctx, m)
if err != nil {
logrus.WithError(err).Errorf("Failed to update device list")
logrus.WithFields(logrus.Fields{
"user_id": m.UserID,
"device_id": m.DeviceID,
"stream_id": m.StreamID,
"prev_id": m.PrevID,
}).WithError(err).Errorf("Failed to update device list")
return false
}
return true