Skip to content

[HttpClient] display proper error message on TransportException when curl is used #31586

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
merged 1 commit into from
May 23, 2019

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 4.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Reported independently by @GawainLynch and @tgalopin:
the message of TransportException is currently empty when using CurlHttpClient.

This now displays e.g.

  [Symfony\Component\HttpClient\Exception\TransportException]      
  Couldn't connect to server for http://localhost:8000/index.html  

@nicolas-grekas nicolas-grekas merged commit 3273109 into symfony:4.3 May 23, 2019
nicolas-grekas added a commit that referenced this pull request May 23, 2019
…ption when curl is used (nicolas-grekas)

This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] display proper error message on TransportException when curl is used

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Reported independently by @GawainLynch and @tgalopin:
the message of TransportException is currently empty when using CurlHttpClient.

This now displays e.g.
```
  [Symfony\Component\HttpClient\Exception\TransportException]
  Couldn't connect to server for http://localhost:8000/index.html
```

Commits
-------

3273109 [HttpClient] display proper error message on TransportException when curl is used
@nicolas-grekas nicolas-grekas deleted the hc-fix-msg branch May 28, 2019 10:30
@fabpot fabpot mentioned this pull request May 28, 2019
nicolas-grekas added a commit that referenced this pull request Sep 29, 2021
…icolas-grekas)

This PR was merged into the 5.4 branch.

Discussion
----------

[HttpClient] improve curl error message when possible

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37666
| License       | MIT
| Doc PR        | -

Fix #37666, improves #31586

Commits
-------

fac0e66 [HttpClient] improve curl error message when possible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants