Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Webhook][RemoteEvent] Sendgrid webhook only parses the first event #53727

Closed
@SherinBloemendaal

Description

@SherinBloemendaal

Symfony version(s) affected

6.4.2

Description

Currently, the implementation of handling SendGrid webhooks processes only the first event. However, SendGrid webhooks often contain multiple batched events (Reference) causing to miss events in the current implementation. The SendgridRequestParser.php#L44 expects a single AbstractMailerEvent to be returned so i think this one is hard to fix without breaking the current implementation.

How to reproduce

  1. Implement the Sendgrid webhook & mailer by following the Symfony Docs.
  2. Send an e-mail to a non-existing recipient address, causing a direct defer. The webhook will contain a processed event and a deferred event.
  3. Only the first event is being parsed. (Ref to code)

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions