@@ -201,8 +201,7 @@ discard block |
||
| 201 | 201 | try |
| 202 | 202 | { |
| 203 | 203 | $token = JWT::encode($payload, $this->own_private_key(), $this->jwt['algorithm']); |
| 204 | - } |
|
| 205 | - catch (\Exception $e) |
|
| 204 | + } catch (\Exception $e) |
|
| 206 | 205 | { |
| 207 | 206 | Log::instance()->error($e->getMessage().PHP_EOL.$e->getTraceAsString()); |
| 208 | 207 | throw new Exception\JSON('unable to create JWT token', $e); |
@@ -231,8 +230,7 @@ discard block |
||
| 231 | 230 | $body = $httpresponse->getBody()->getContents(); |
| 232 | 231 | Log::instance()->debug('got response:'.PHP_EOL.$body); |
| 233 | 232 | return new $this->response_class($body, $this->jwt); |
| 234 | - } |
|
| 235 | - catch (\GuzzleHttp\Exception\RequestException $e) |
|
| 233 | + } catch (\GuzzleHttp\Exception\RequestException $e) |
|
| 236 | 234 | { |
| 237 | 235 | $this->handle_request_exception($e); |
| 238 | 236 | } |
@@ -154,8 +154,7 @@ |
||
| 154 | 154 | try |
| 155 | 155 | { |
| 156 | 156 | $decoded = (array) JWT::decode($token, $this->uapay_public_key(), array($this->jwt['algorithm'])); |
| 157 | - } |
|
| 158 | - catch (\Exception $e) |
|
| 157 | + } catch (\Exception $e) |
|
| 159 | 158 | { |
| 160 | 159 | Log::instance()->error($e->getMessage().PHP_EOL.$e->getTraceAsString()); |
| 161 | 160 | throw new Exception\JSON('unable to decode JWT token', $e); |