Skip to content

Commit

Permalink
Merge pull request #19 from kaushikindianic/000-accountPicture-find-a…
Browse files Browse the repository at this point in the history
…nd-fix-issue

fix:  debuging account picture issue #000
  • Loading branch information
joostfaassen committed Jan 27, 2020
2 parents a9cf33e + 828ea17 commit e69d00e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Client.php
Expand Up @@ -284,13 +284,21 @@ public function getData($uri, $jsonData = null)
}

$json = curl_exec($ch);

if($json === false)
{
throw new RuntimeException('Curl error: '.curl_error($ch));
}

$info = curl_getinfo($ch);
$code = $this->getStatusCode($ch);
if ($this->timeDataCollector) {
$this->timeDataCollector->stopMeasure('getData');
}


if (200 != $code) {
throw new RuntimeException('HTTP Status code: '.$code);
throw new RuntimeException('HTTP Status code: '.$code.'message: '.$json);
}
$data = @json_decode($json, true);
curl_close($ch);
Expand Down

0 comments on commit e69d00e

Please sign in to comment.