psu-libraries / researcher-metadata

Penn State University's faculty and research metadata repository
https://metadata.libraries.psu.edu/
MIT License
7 stars 0 forks source link

Rescue and log `Net::ReadTimeout` when sending oa email notifications #1018

Open ajkiessl opened 2 weeks ago

ajkiessl commented 2 weeks ago

In OpenAccessNotifier#send_notification_to_user, we rescue Net::SMTPFatalError and log it so the iterator continues to the next notification. We have, however, run into other Net errors. Specifically: ReadTimeout. This could be caused by a temporary issue with the connection to the mail server, so I think it makes sense to rescue it as well, log it, and move to the next notification.