Skip to content

Commit

Permalink
Fix errors without a description
Browse files Browse the repository at this point in the history
  • Loading branch information
giorgioma authored and mstefan21 committed Aug 10, 2022
1 parent 74a12bd commit 7009a3b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Provider/Keycloak.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ protected function getScopeSeparator()
protected function checkResponse(ResponseInterface $response, $data)
{
if (!empty($data['error'])) {
$error = $data['error'].': '.$data['error_description'];
$error = $data['error'];
if(isset($data['error_description'])){
$error.=': '.$data['error_description'];
}
throw new IdentityProviderException($error, 0, $data);
}
}
Expand Down

0 comments on commit 7009a3b

Please sign in to comment.