Added exception on curl error.