diff --git a/lib/Core/Connection.php b/lib/Core/Connection.php index 4cddeff..0bb63fc 100644 --- a/lib/Core/Connection.php +++ b/lib/Core/Connection.php @@ -196,9 +196,9 @@ public function callApi($endpoint = null,$payload = '',$method = 'get',$type = ' $this->logger->error("Curl error: " . $error); } - $curlErrorNo = curl_error($this->curl); + $curlErrorNo = curl_errno($this->curl); - if (empty($curlErrorNo) === false) { + if ($curlErrorNo !== CURLE_OK) { $this->logger->error("Curl errorNo: " . $curlErrorNo); } @@ -339,4 +339,4 @@ protected function buildResponseHeaders($rawHeaders) return $headers; } -} \ No newline at end of file +}