Skip to content

Commit

Permalink
Merge pull request #621 from zargener/master
Browse files Browse the repository at this point in the history
Handling Oauth server internal errors.
  • Loading branch information
ramsey authored Apr 19, 2017
2 parents 629d1b4 + fde7079 commit aad09cb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Provider/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,14 @@ protected function parseResponse(ResponseInterface $response)
throw $e;
}

if ($response->getStatusCode() == 500) {
throw new UnexpectedValueException(
'An OAuth server error was encountered that did not contain a JSON body',
0,
$e
);
}

return $content;
}
}
Expand Down

0 comments on commit aad09cb

Please sign in to comment.