Skip to content

[12.x] Enable HTTP client retries when middleware throws an exception #55343

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

27pchrisl
Copy link
Contributor

In Laravel 11 an HTTP client middleware could throw a custom exception and the retry method would be able to capture that. L12 added another parameter to the retry callback that may not be defined during the middleware processing stage.

This PR re-enables that L11 behaviour and includes a test for it.

@taylorotwell taylorotwell merged commit c4bc126 into laravel:12.x Apr 9, 2025
60 checks passed
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.

2 participants