@@ 47-49 (lines=3) @@ | ||
44 | */ |
|
45 | protected function transformResponseToException(RequestInterface $request, ResponseInterface $response) |
|
46 | { |
|
47 | if ($response->getStatusCode() >= 400 && $response->getStatusCode() < 500) { |
|
48 | throw new ClientErrorException($response->getReasonPhrase(), $request, $response); |
|
49 | } |
|
50 | ||
51 | if ($response->getStatusCode() >= 500 && $response->getStatusCode() < 600) { |
|
52 | throw new ServerErrorException($response->getReasonPhrase(), $request, $response); |
|
@@ 51-53 (lines=3) @@ | ||
48 | throw new ClientErrorException($response->getReasonPhrase(), $request, $response); |
|
49 | } |
|
50 | ||
51 | if ($response->getStatusCode() >= 500 && $response->getStatusCode() < 600) { |
|
52 | throw new ServerErrorException($response->getReasonPhrase(), $request, $response); |
|
53 | } |
|
54 | ||
55 | return $response; |
|
56 | } |