Skip to content

[Webhook][RemoteEvent] SendgridPayloadConverter does not support string category #59374

@ericabouaf

Description

@ericabouaf

Symfony version(s) affected

6.4.17

Description

When sending an email using Sendgrid and the "category" field as a string, the webhook parser fails :

AbstractMailerEvent::setTags(): Argument #1 ($tags) must be of type array, string given, called in vendor/symfony/sendgrid-mailer/RemoteEvent/SendgridPayloadConverter.php on line 54

According to Sendgrid's documentation (https://www.twilio.com/docs/sendgrid/for-developers/tracking-events/event#json-objects) :

category - Categories are custom tags that you set for the purpose of organizing your emails. If you send single categories as an array, they will be returned by the webhook as an array. If you send single categories as a string, they will be returned by the webhook as a string.

How to reproduce

  • Have a Symfony app with the sendgrid webhook installed
  • Send an email with the sendgrid category as a string

=> the SendgridPayloadConverter should fails when calling setTags (which expects an array)

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy