avoid printing curl error if error message has already been set