Commit 4106712
committed
bug #46293 [HttpClient] "debug" is missing if a request failed to even start (weaverryan)
This PR was squashed before being merged into the 6.1 branch.
Discussion
----------
[HttpClient] "debug" is missing if a request failed to even start
| Q | A
| ------------- | ---
| Branch? | 6.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | none
| Tickets | none
| License | MIT
| Doc PR | not needed
If you do something really silly - like `$client->request('/foo')` (where no `base_uri` is configured), HttpClient correctly explodes with:
> Invalid URL: scheme is missing in "/SymfonyCasts/vinyl-mixes/main/mixes.json". Did you forget to add "http(s)://"?
However, in this situation, there will be no `debug` key in `$trace`. And so, currently on 6.1, instead of the above error, you see:
> Warning: Undefined array key "debug"
Let me know if any changes are needed.
Thanks!
Commits
-------
4beb320 [HttpClient] "debug" is missing if a request failed to even startFile tree
1 file changed
+4
-0
lines changed- src/Symfony/Component/HttpClient/DataCollector
1 file changed
+4
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
174 | 178 | | |
175 | 179 | | |
176 | 180 | | |
| |||
0 commit comments