diff --git a/api/RestfulService.php b/api/RestfulService.php index 3cd44431e..fde9898f3 100644 --- a/api/RestfulService.php +++ b/api/RestfulService.php @@ -298,6 +298,8 @@ class RestfulService extends ViewableData { protected function extractResponse($ch, $rawResponse) { //get the status code $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + //get a curl error if there is one + $curlError = curl_error($ch); //normalise the status code if($curlError !== '' || $statusCode == 0) $statusCode = 500; //calculate the length of the header and extract it