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.
This commit is contained in:
Winni Neessen 2024-09-19 12:12:48 +02:00
parent 0239318d94
commit f469ba977d
Signed by: wneessen
GPG key ID: 385AC9889632126E

View file

@ -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()
}