From 7de690c4252fc392bf96d8736157375bacc51eb3 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 5 Nov 2025 12:18:45 +0200 Subject: [PATCH] curl error details --- .../Espo/Core/ExternalAccount/OAuth2/Client.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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);