Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Fix errors without a description
Browse files Browse the repository at this point in the history
  • Loading branch information
sdaoudi authored Dec 19, 2023
1 parent 7dd35ad commit 1abff78
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Provider/Keycloak.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ protected function getScopeSeparator()
protected function checkResponse(ResponseInterface $response, $data)
{
if (!empty($data['error'])) {
$error = $data['error'].': '.$data['error_description'];
throw new IdentityProviderException($error, 0, $data);
$error = $data['error'];
if(isset($data['error_description'])){
$error.=': '.$data['error_description'];
}
}
}

Expand Down

0 comments on commit 1abff78

Please sign in to comment.