From f469ba977d299cb17e33fc1b0f025769648cb7f1 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Thu, 19 Sep 2024 12:12:48 +0200 Subject: [PATCH] Add affected message ID to error log Include the affected message ID in the error message to provide more context for debugging. This change ensures that each error log contains essential information about the specific message associated with the error. --- senderror.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/senderror.go b/senderror.go index 72500cd..494bfd3 100644 --- a/senderror.go +++ b/senderror.go @@ -93,6 +93,11 @@ func (e *SendError) Error() string { } } } + if e.affectedMsg != nil && e.affectedMsg.GetMessageID() != "" { + errMessage.WriteString(", affected message ID: ") + errMessage.WriteString(e.affectedMsg.GetMessageID()) + } + return errMessage.String() }