From 80a382d098e4029acda3fc150f4f5ee46cc06176 Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Sun, 4 Oct 2020 13:55:59 -0600 Subject: [PATCH] slight tweaks to notifications error handling. --- webapp/backend/pkg/notify/notify.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/webapp/backend/pkg/notify/notify.go b/webapp/backend/pkg/notify/notify.go index dffece3..c2ae507 100644 --- a/webapp/backend/pkg/notify/notify.go +++ b/webapp/backend/pkg/notify/notify.go @@ -206,10 +206,19 @@ func (n *Notify) SendShoutrrrNotification(shoutrrrUrl string) error { var errstrings []string for _, err := range errs { + if err == nil || err.Error() == "" { + continue + } n.Logger.Error(err) errstrings = append(errstrings, err.Error()) } - return errors.New(strings.Join(errstrings, "\n")) + //sometimes there are empty errs, we're going to skip them. + if len(errstrings) == 0 { + return nil + } else { + return errors.New(strings.Join(errstrings, "\n")) + + } } return nil }