setError on curl failure