From 58864596e9aa5afd5fbf4ac85c432e56d83cea87 Mon Sep 17 00:00:00 2001 From: Norbert Kwizera Date: Fri, 1 Nov 2024 14:18:28 +0200 Subject: [PATCH] Log error when marking queue job for outgoing message complete fails --- backends/rapidpro/backend.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backends/rapidpro/backend.go b/backends/rapidpro/backend.go index 7766761e..58baa215 100644 --- a/backends/rapidpro/backend.go +++ b/backends/rapidpro/backend.go @@ -466,7 +466,10 @@ func (b *backend) MarkOutgoingMsgComplete(ctx context.Context, msg courier.MsgOu dbMsg := msg.(*Msg) - queue.MarkComplete(rc, msgQueueName, dbMsg.workerToken) + err := queue.MarkComplete(rc, msgQueueName, dbMsg.workerToken) + if err != nil { + slog.Error("error marking outgoing message complete", "error", err, "msg_id", dbMsg.ID_.String(), "status", status.Status()) + } // mark as sent in redis as well if this was actually wired or sent if status != nil && (status.Status() == courier.MsgStatusSent || status.Status() == courier.MsgStatusWired) {