BUG: Fetch curl_error in RestfulService

$curlError was used only once and never defined. Replace $curlError with
a call to curl_error($ch).
Merge pull request #1230 from oddnoc/3.1-restfulservice-error-check

BUG: Fetch curl_error in RestfulService