update curl examples + add error handling for missing env details