Notification is working but I’m still seeing errors in the logs about emails

XRAY: Email notifications in Xray and how to debug issues when they happen

AuthorFullName__c
Dor Tambour
articleNumber
000005604
ft:sourceType
Salesforce
FirstPublishedDate
2023-03-09T12:58:53Z
lastModifiedDate
2023-03-09
VersionNumber
1
Usually, If email notifications are working there is no reason to worry about error messages in the logs. Error messages from the logs will look like this:
[ERROR] [37690ac1e713dbb4] [exchange_handler:646     ] [main        ] Worker notification id x failed to process message error: Failed sending email to: gomail: could not send email 1: gomail: invalid address "": email: no address 

This error message occurs when email notifications are not working but also when they are working and Xray is trying to send Email to an Invalid email address or one that doesn’t exist.
You can search in the Artifactory database for all users' email addresses by using the following query:
select * from access_users;

You can make sure that all of the users and email recipients in the watch and policies in the watch are having valid emails and if that’s the case then you may check who deployed the artifact by navigating to the artifact in Artifactory.
Sometimes artifacts are deployed by builds or automation without a user behind them and in that case, it will show that they were deployed by an Anonymous user who doesn’t have an email by default.
In case there is a policy to notify the deployer Xray will try to send the notification to an empty email and will send an error message in the logs.