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