8000 [symfony/mailjet-mailer] Error message is not processed correctly · Issue #45420 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[symfony/mailjet-mailer] Error message is not processed correctly #45420
Closed
@EmanuelOster

Description

@EmanuelOster

Symfony version(s) affected

5.4.4

Description

When sending a mail via the mailjet api, the transport checks if the response code is 200. If it is not, it tries to fetch the error message from the response and throws an exception. At the moment, the code looks for $result['Message'] which does not exist.

Instead, $result has a Messages (plural) array which is structured as follows:
image

I am not sure if this is a change in the api or if both variants can occur depending on the situation.

How to reproduce

Simply send an invalid mail to the api. For example we tried to send a mail with a "from" header (lowercase).

Possible Solution

Probably just grab the first error in the array.

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

      0