diff --git a/application/Espo/Core/ExternalAccount/OAuth2/Client.php b/application/Espo/Core/ExternalAccount/OAuth2/Client.php index 70bfbc538e..2ae5c90a4b 100644 --- a/application/Espo/Core/ExternalAccount/OAuth2/Client.php +++ b/application/Espo/Core/ExternalAccount/OAuth2/Client.php @@ -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);