diff --git a/internal/domain/domain.go b/internal/domain/domain.go index e6d5535..700ac08 100644 --- a/internal/domain/domain.go +++ b/internal/domain/domain.go @@ -77,9 +77,7 @@ func (d *Domain) NotifyThreshold() error { for _, threshold := range viper.GetIntSlice("threshold") { if d.TriggeredThreshold != threshold && daysLeft <= threshold { msg := message.NewThresholdMessage(d.Name, daysLeft) - if err := integration.Send(msg); err != nil { - return err - } + integration.Send(msg) d.TriggeredThreshold = threshold break } @@ -97,9 +95,7 @@ func (d *Domain) NotifyStatusChange() error { if len(changes) > 0 { msg := message.NewStatusChangedMessage(d.Name, changes) - if err := integration.Send(msg); err != nil { - return err - } + integration.Send(msg) } } return nil diff --git a/internal/integration/integration.go b/internal/integration/integration.go index 8770b95..bcb865c 100644 --- a/internal/integration/integration.go +++ b/internal/integration/integration.go @@ -49,13 +49,12 @@ func Setup() error { return nil } -func Send(message string) error { - for _, integration := range Default { +func Send(message string) { + for name, integration := range Default { if err := integration.Send(message); err != nil { - return err + log.WithField("integration", name).Error(err) } } - return nil } func Get(key string) Integration {