@@ -20,11 +20,8 @@ |
||
| 20 | 20 | use PhraseanetSDK\Exception\InvalidArgumentException; |
| 21 | 21 | use PhraseanetSDK\Exception\RuntimeException; |
| 22 | 22 | use Symfony\Component\EventDispatcher\EventSubscriberInterface; |
| 23 | - |
|
| 24 | -use GuzzleHttp\Psr7\Request; |
|
| 25 | 23 | use Psr\Http\Message\RequestInterface; |
| 26 | 24 | use GuzzleHttp\RequestOptions; |
| 27 | - |
|
| 28 | 25 | use GuzzleLogMiddleware\LogMiddleware; |
| 29 | 26 | use GuzzleHttp\HandlerStack; |
| 30 | 27 | |
@@ -188,11 +188,9 @@ |
||
| 188 | 188 | |
| 189 | 189 | // $this->addRequestParameters($request, $query, $postFields, $files); |
| 190 | 190 | // $response = $request->send(); |
| 191 | - } |
|
| 192 | - catch (GuzzleBadResponse $e) { |
|
| 191 | + } catch (GuzzleBadResponse $e) { |
|
| 193 | 192 | throw BadResponseException::fromGuzzleResponse($e); |
| 194 | - } |
|
| 195 | - catch (GuzzleException $e) { |
|
| 193 | + } catch (GuzzleException $e) { |
|
| 196 | 194 | throw new RuntimeException($e->getMessage(), $e->getCode(), $e); |
| 197 | 195 | } |
| 198 | 196 | |
@@ -67,8 +67,7 @@ |
||
| 67 | 67 | { |
| 68 | 68 | try { |
| 69 | 69 | $response = $this->getAdapter()->call($method, $path, $query, $postFields, array(), $headers); |
| 70 | - } |
|
| 71 | - catch (BadResponseException $e) { |
|
| 70 | + } catch (BadResponseException $e) { |
|
| 72 | 71 | $statusCode = $e->getStatusCode(); |
| 73 | 72 | switch ($statusCode) { |
| 74 | 73 | case 404: |