Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

Commit

Permalink
Catch all Guzzle exceptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jarnovanleeuwen committed Oct 31, 2018
1 parent fba45cc commit 8c36b3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use Firebase\JWT\JWT;
use GuzzleHttp\Client as HttpClient;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\RequestOptions;
use PHPTikkie\Exceptions\AccessTokenException;
use PHPTikkie\Exceptions\RequestException;
Expand Down Expand Up @@ -120,7 +120,7 @@ protected function requestAccessToken(): AccessToken
}

throw new AccessTokenException($response->getBody());
} catch (ClientException $exception) {
} catch (GuzzleException $exception) {
throw new AccessTokenException($exception->getMessage());
}
}
Expand Down Expand Up @@ -163,7 +163,7 @@ public function send(AbstractRequest $request): Response
}

throw new RequestException($response->getBody());
} catch (ClientException $exception) {
} catch (GuzzleException $exception) {
throw new RequestException($exception->getMessage());
}
}
Expand Down

0 comments on commit 8c36b3b

Please sign in to comment.