68508bef by fehrlich

added unauthorized exeption

1 parent 31d1c521
......@@ -386,6 +386,9 @@ abstract class ImmoScoutAPI extends GuzzleClient
];
if (!empty($res->getBody())) {
try {
if ($res->getStatusCode() == "401") {
throw new AuthException("Immoscout24-API: " . $res->getReasonPhrase());
}
$json = json_decode($res->getBody(), true);
} catch (InvalidArgumentException $ex) {
$json = [];
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!