From 7de54981d529f430cc0766906df20fa2dc7c9fe0 Mon Sep 17 00:00:00 2001 From: "kaushik.prajapati" Date: Mon, 27 Jan 2020 15:53:26 +0530 Subject: [PATCH 1/2] fix: debuging account picture issue #000 --- src/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index 40f91f3..a618f46 100644 --- a/src/Client.php +++ b/src/Client.php @@ -290,7 +290,7 @@ public function getData($uri, $jsonData = null) $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); From 828ea17ceb4de4f11985c723abeb2f6df9921599 Mon Sep 17 00:00:00 2001 From: "kaushik.prajapati" Date: Mon, 27 Jan 2020 16:10:43 +0530 Subject: [PATCH 2/2] fix: debugging account picture #000 --- src/Client.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Client.php b/src/Client.php index a618f46..f65f088 100644 --- a/src/Client.php +++ b/src/Client.php @@ -284,11 +284,19 @@ 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.'message: '.$json); }