@@ 22-24 (lines=3) @@ | ||
19 | */ |
|
20 | protected function transformResponseToException(RequestInterface $request, ResponseInterface $response) |
|
21 | { |
|
22 | if ($response->getStatusCode() >= 400 && $response->getStatusCode() < 500) { |
|
23 | throw new ClientErrorException($response->getReasonPhrase(), $request, $response); |
|
24 | } |
|
25 | ||
26 | if ($response->getStatusCode() >= 500 && $response->getStatusCode() < 600) { |
|
27 | throw new ServerErrorException($response->getReasonPhrase(), $request, $response); |
|
@@ 26-28 (lines=3) @@ | ||
23 | throw new ClientErrorException($response->getReasonPhrase(), $request, $response); |
|
24 | } |
|
25 | ||
26 | if ($response->getStatusCode() >= 500 && $response->getStatusCode() < 600) { |
|
27 | throw new ServerErrorException($response->getReasonPhrase(), $request, $response); |
|
28 | } |
|
29 | ||
30 | return $response; |
|
31 | } |