diff --git a/src/Exchange.php b/src/Exchange.php index 0f2e730..4fc4743 100644 --- a/src/Exchange.php +++ b/src/Exchange.php @@ -293,8 +293,8 @@ private function prepareResponseResult($body) new DateTime($response['date']), $response['rates'] ); - } else if (isset($response['error'])) { - throw new ResponseException($response['error']); + } else if (isset($response['error']['info'])) { + throw new ResponseException($response['error']['info']); } else { throw new ResponseException('Response body is malformed.'); }