This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component
Nicolas Grekas ff7ffdf22a bug #38977 [HttpClient] Check status code before decoding content in TraceableResponse (chalasr)
This PR was merged into the 5.1 branch.

Discussion
----------

[HttpClient] Check status code before decoding content in TraceableResponse

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | np
| Tickets       | -
| License       | MIT
| Doc PR        | -

Using `toArray()` on the response of a traceable client, the status code is currently checked after json decoding, which leads to `JsonException` being thrown instead of `ClientException`.
It should be the opposite, as for non-traceable responses.

Commits
-------

e5595dae73 [HttpClient] Check status code before decoding content in TraceableResponse
2020-11-03 21:22:18 +01:00
..
Asset Merge branch '4.4' into 5.1 2020-10-24 14:01:57 +02:00
BrowserKit Merge branch '4.4' into 5.1 2020-10-28 22:31:18 +01:00
Cache Merge branch '4.4' into 5.1 2020-11-02 08:55:38 +01:00
Config Merge branch '4.4' into 5.1 2020-10-28 22:31:18 +01:00
Console Merge branch '4.4' into 5.1 2020-10-28 22:31:18 +01:00
CssSelector Merge branch '4.4' into 5.1 2020-10-28 22:31:18 +01:00
DependencyInjection Merge branch '4.4' into 5.1 2020-11-02 16:45:32 +01:00
DomCrawler Merge branch '4.4' into 5.1 2020-10-24 14:01:57 +02:00
Dotenv Merge branch '4.4' into 5.1 2020-10-24 14:01:57 +02:00
ErrorHandler Merge branch '4.4' into 5.1 2020-10-28 22:31:18 +01:00
EventDispatcher Merge branch '4.4' into 5.1 2020-11-01 16:43:26 +01:00
ExpressionLanguage Merge branch '4.4' into 5.1 2020-10-28 22:31:18 +01:00
Filesystem Fix CS 2020-10-28 22:33:29 +01:00
Finder Merge branch '4.4' into 5.1 2020-11-02 08:55:38 +01:00
Form Merge branch '4.4' into 5.1 2020-11-02 16:45:32 +01:00
HttpClient [HttpClient] Check status code before decoding content in TraceableResponse 2020-11-03 21:20:54 +01:00
HttpFoundation Merge branch '4.4' into 5.1 2020-11-01 16:43:26 +01:00
HttpKernel Merge branch '4.4' into 5.1 2020-11-02 17:09:08 +01:00
Inflector Merge branch '4.4' into 5.1 2020-10-24 14:01:57 +02:00
Intl Merge branch '4.4' into 5.1 2020-11-03 12:59:17 +01:00
Ldap Merge branch '4.4' into 5.1 2020-11-01 16:43:26 +01:00
Lock Merge branch '4.4' into 5.1 2020-10-28 22:31:18 +01:00
Mailer Merge branch '4.4' into 5.1 2020-10-28 22:31:18 +01:00
Messenger Merge branch '4.4' into 5.1 2020-11-01 20:20:14 +01:00
Mime Merge branch '4.4' into 5.1 2020-10-28 22:31:18 +01:00
Notifier fix merge 2020-10-24 14:03:25 +02:00
OptionsResolver Merge branch '4.4' into 5.1 2020-10-24 14:01:57 +02:00
Process Merge branch '4.4' into 5.1 2020-11-02 16:45:32 +01:00
PropertyAccess Merge branch '4.4' into 5.1 2020-11-01 16:43:26 +01:00
PropertyInfo Merge branch '4.4' into 5.1 2020-10-28 22:31:18 +01:00
Routing Fix transiant tests in 4.4 2020-11-01 22:34:37 +01:00
Security Merge branch '4.4' into 5.1 2020-11-02 16:45:32 +01:00
Serializer Merge branch '4.4' into 5.1 2020-11-01 16:43:26 +01:00
Stopwatch Merge branch '4.4' into 5.1 2020-11-01 16:43:26 +01:00
String Merge branch '4.4' into 5.1 2020-10-24 14:01:57 +02:00
Templating Merge branch '4.4' into 5.1 2020-10-24 14:01:57 +02:00
Translation Merge branch '4.4' into 5.1 2020-10-28 22:31:18 +01:00
Uid Merge branch '4.4' into 5.1 2020-10-24 14:01:57 +02:00
Validator Merge branch '4.4' into 5.1 2020-11-02 16:45:32 +01:00
VarDumper Merge branch '4.4' into 5.1 2020-10-28 22:31:18 +01:00
VarExporter Merge branch '4.4' into 5.1 2020-10-28 22:31:18 +01:00
WebLink Merge branch '4.4' into 5.1 2020-10-24 14:01:57 +02:00
Workflow Fix CS 2020-10-28 22:33:29 +01:00
Yaml fix merge 2020-10-24 14:03:25 +02:00