We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e9ac69 commit 6ce460fCopy full SHA for 6ce460f
src/Provider/BattleNet.php
@@ -85,8 +85,8 @@ protected function getDefaultScopes()
85
protected function checkResponse(ResponseInterface $response, $data)
86
{
87
if ($response->getStatusCode() != 200) {
88
- $data = json_decode($data, true);
89
- throw new IdentityProviderException($data['message'], $response->getStatusCode(), $data);
+ $data = (is_array($data)) ? $data : json_decode($data, true);
+ throw new IdentityProviderException($data['error_description'], $response->getStatusCode(), $data);
90
}
91
92
0 commit comments