Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit b68d5d3

Browse files
author
Sascha Thielemann
authored
Merge pull request #21 from nicolus/curl-error
Show curl error in the exception if cURL request failed
2 parents 2ac56f3 + 0611311 commit b68d5d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DeepL.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ protected function request($url, $body = '')
249249
$response = curl_exec($this->curl);
250250

251251
if (curl_errno($this->curl)) {
252-
throw new DeepLException('There was a cURL Request Error.');
252+
throw new DeepLException('There was a cURL Request Error : ' . curl_error($this->curl));
253253
}
254254
$httpCode = curl_getinfo($this->curl, CURLINFO_HTTP_CODE);
255255
$responseArray = json_decode($response, true);

0 commit comments

Comments
 (0)