@@ -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: |
@@ -105,8 +105,7 @@ |
||
| 105 | 105 | ); |
| 106 | 106 | $data = json_decode($responseContent, true); |
| 107 | 107 | $token = $data["access_token"]; |
| 108 | - } |
|
| 109 | - catch (BadResponseException $e) { |
|
| 108 | + } catch (BadResponseException $e) { |
|
| 110 | 109 | $response = json_decode($e->getResponseBody(), true); |
| 111 | 110 | $msg = isset($response['error']) ? $response['error'] : (isset($response['msg']) ? $response['msg'] : ''); |
| 112 | 111 | |