curl error details
This commit is contained in:
@@ -363,7 +363,15 @@ class Client
|
||||
$response = curl_exec($ch);
|
||||
|
||||
if ($response === false) {
|
||||
throw new Exception("Curl failure.");
|
||||
$message = "Curl failure.";
|
||||
|
||||
$curlError = curl_error($ch);
|
||||
|
||||
if ($curlError) {
|
||||
$message .= " " . $curlError;
|
||||
}
|
||||
|
||||
throw new Exception($message);
|
||||
}
|
||||
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
|
||||
Reference in New Issue
Block a user