Skip to content

[12.x] Pass TransportException to NotificationFailed event #56061

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

hackel
Copy link
Contributor

@hackel hackel commented Jun 17, 2025

This fixes #56058.

When the Postmark mail driver receives a non-200 response, it throws an HttpTransportException that contains a CurlResponse object that is not serializable. This causes dispatching the NotificationFailed event to fail when attempting to place it on the Queue. This PR checks for an HttpTransportException and converts it to a TransportException without the Response object before attaching it to the 'NotificationFailed' event.

… event

Prevents including the CurlResponse object that cannot be serialized with
the NotificationFailed event.
@taylorotwell taylorotwell merged commit 322ffaf into laravel:12.x Jun 18, 2025
62 checks passed
@hackel hackel deleted the catch-httptransportexception-fix-56058 branch June 25, 2025 20:00
mohammad-fouladgar pushed a commit to mohammad-fouladgar/framework that referenced this pull request Jul 22, 2025
… event (laravel#56061)

Prevents including the CurlResponse object that cannot be serialized with
the NotificationFailed event.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mail Notification fails with: Cannot serialize CurlResponse
2 participants