Skip to content

Commit

Permalink
Update Wrike.php
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelKaefer authored Jan 25, 2019
1 parent 05cc8fa commit 7879d69
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Provider/Wrike.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ protected function getDefaultScopes()
protected function checkResponse(ResponseInterface $response, $data)
{
if (isset($data['error'])) {
throw new IdentityProviderException($data['error_description'], $response->getStatusCode(), $response);
if (isset($data['error_description'])) {
$message = $data['error_description'];
} else {
$message = $data['errorDescription'];
}
throw new IdentityProviderException($message, $response->getStatusCode(), $response);
}
}

Expand Down

0 comments on commit 7879d69

Please sign in to comment.