STD came out positive

I have chlamydia and I have to take antibiotics the first time didn’t work bc I threw up. What do I do to stop it from upsetting my stomach and throwing up. Does it still work if I throw up?