diff --git a/internal/bounce/webhooks/ses.go b/internal/bounce/webhooks/ses.go index 02b423c..a7e8d6d 100644 --- a/internal/bounce/webhooks/ses.go +++ b/internal/bounce/webhooks/ses.go @@ -119,7 +119,7 @@ func (s *SES) ProcessBounce(b []byte) (models.Bounce, error) { return bounce, fmt.Errorf("error unmarshalling SES notification: %v", err) } - if !(m.EventType == "Bounce" || m.NotifType == "Bounce") { + if (m.EventType != "" && m.EventType != "Bounce") || (m.NotifType != "" && m.NotifType != "Bounce") { return bounce, errors.New("notification type is not bounce") }