handle cURL errors
Merge pull request #56 from Remo/curl-exception-handling

handle cURL errors