Skip to content

Commit e69d00e

Browse files
authored
Merge pull request #19 from kaushikindianic/000-accountPicture-find-and-fix-issue
fix: debuging account picture issue #000
2 parents a9cf33e + 828ea17 commit e69d00e

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/Client.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,21 @@ public function getData($uri, $jsonData = null)
284284
}
285285

286286
$json = curl_exec($ch);
287+
288+
if($json === false)
289+
{
290+
throw new RuntimeException('Curl error: '.curl_error($ch));
291+
}
292+
287293
$info = curl_getinfo($ch);
288294
$code = $this->getStatusCode($ch);
289295
if ($this->timeDataCollector) {
290296
$this->timeDataCollector->stopMeasure('getData');
291297
}
298+
299+
292300
if (200 != $code) {
293-
throw new RuntimeException('HTTP Status code: '.$code);
301+
throw new RuntimeException('HTTP Status code: '.$code.'message: '.$json);
294302
}
295303
$data = @json_decode($json, true);
296304
curl_close($ch);

0 commit comments

Comments
 (0)