We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a9cf33e + 828ea17 commit e69d00eCopy full SHA for e69d00e
1 file changed
src/Client.php
@@ -284,13 +284,21 @@ public function getData($uri, $jsonData = null)
284
}
285
286
$json = curl_exec($ch);
287
+
288
+ if($json === false)
289
+ {
290
+ throw new RuntimeException('Curl error: '.curl_error($ch));
291
+ }
292
293
$info = curl_getinfo($ch);
294
$code = $this->getStatusCode($ch);
295
if ($this->timeDataCollector) {
296
$this->timeDataCollector->stopMeasure('getData');
297
298
299
300
if (200 != $code) {
- throw new RuntimeException('HTTP Status code: '.$code);
301
+ throw new RuntimeException('HTTP Status code: '.$code.'message: '.$json);
302
303
$data = @json_decode($json, true);
304
curl_close($ch);
0 commit comments