Skip to content

Handles factory=null in ConnectException while recording request-response in PendingRequest#54121

Merged
taylorotwell merged 1 commit into
laravel:11.xfrom
StSarc:http-client-factory-fix
Jan 9, 2025
Merged

Handles factory=null in ConnectException while recording request-response in PendingRequest#54121
taylorotwell merged 1 commit into
laravel:11.xfrom
StSarc:http-client-factory-fix

Conversation

@StSarc

@StSarc StSarc commented Jan 8, 2025

Copy link
Copy Markdown
Contributor

I fixed a bug where if there's a connectException while making a HTTP request (in send) and the factory is null (not set), it fails while trying to record request-response pair. This was added in #53530.

factory is not a mandatory object to be set while constructing PendingRequest. It's handled accordingly everywhere else in the code, except in the connectException.

This makes the code robust by ensuring the flow does not break if there's a connectException AND factory is not set.

@taylorotwell taylorotwell merged commit 0914011 into laravel:11.x Jan 9, 2025
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