Skip to content

Commit

Permalink
Type hint correct exception
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed Dec 27, 2014
1 parent c381cfc commit 7c5137b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/AdamWathan/EloquentOAuth/Providers/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use AdamWathan\EloquentOAuth\Exceptions\InvalidAuthorizationCodeException;
use Illuminate\Http\Request as Input;
use Guzzle\Http\Client as HttpClient;
use Guzzle\Http\Exception\BadResponseException;

abstract class Provider implements ProviderInterface
{
Expand Down Expand Up @@ -92,7 +93,7 @@ protected function requestAccessToken()
$request = $this->httpClient->post($url, $this->headers['access_token'], $this->buildAccessTokenPostBody());
try {
$response = $request->send();
} catch (\Exception $e) {
} catch (BadResponseException $e) {
throw new InvalidAuthorizationCodeException((string) $e->getResponse());
}
return $this->parseTokenResponse((string) $response->getBody());
Expand Down

0 comments on commit 7c5137b

Please sign in to comment.