BUG: Fetch curl_error in RestfulService

$curlError was used only once and never defined. Replace $curlError with
a call to curl_error($ch).