diff --git a/internal/notification/service.go b/internal/notification/service.go index 1d0a472..8433d35 100644 --- a/internal/notification/service.go +++ b/internal/notification/service.go @@ -8,6 +8,7 @@ import ( "github.com/autobrr/autobrr/internal/domain" "github.com/autobrr/autobrr/internal/logger" + "github.com/autobrr/autobrr/pkg/errors" "github.com/rs/zerolog" ) @@ -235,9 +236,12 @@ func (s *service) Test(ctx context.Context, notification domain.Notification) er agent = NewNotifiarrSender(s.log, notification) case domain.NotificationTypeTelegram: agent = NewTelegramSender(s.log, notification) + default: + s.log.Error().Msgf("unsupported notification type: %v", notification.Type) + return errors.New("unsupported notification type") } - g, ctx := errgroup.WithContext(ctx) + g, _ := errgroup.WithContext(ctx) for _, event := range events { e := event