Return an error when curl download fails.