diff --git a/src/cuirass/notification.scm b/src/cuirass/notification.scm index ddadac0944a428b5b1cbc0c1a5100921bf95d520..3de7f5bdbf825ae3cd00a74f59f71e510fa21e7d 100644 --- a/src/cuirass/notification.scm +++ b/src/cuirass/notification.scm @@ -105,16 +105,26 @@ the detailed information about this build here: ~a." (server (assq-ref notification #:server)) (subject (notification-subject notification)) (text (notification-text notification))) - (send-email server - #:from from - #:to to - #:subject subject - #:text text))) + (catch #t + (lambda () + (send-email server + #:from from + #:to to + #:subject subject + #:text text)) + (lambda args + (log-message "Failed to send the email notification: ~a." + args))))) (define (notification-mastodon notification) "Send a new status for the given NOTIFICATION." (let ((text (notification-text notification))) - (send-status text))) + (catch #t + (lambda () + (send-status text)) + (lambda args + (log-message "Failed to send the mastodon notification: ~a." + args))))) (define* (send-notifications notifications #:key build) "Send the notifications in NOTIFICATIONS list, regarding the given BUILD."