Diet confusion

Hi guys. 
Today I threw up first thing in the morning. This hasn't happened since I cut out wheat flour. I was throwing up and breaking out in hives and so the doctor recommended cutting it out. 
Okay so long story short, I'm doing a diet to help me get healthier. I got sick this morning. I haven't gotten sick in a while and I'm concerned the new diet I'm on is making me sick. I'm doing the advocare all in challenge and I've been suffering caffeine withdrawal since then. 
Is there a chance I could be getting sick from the diet? I did change my diet pretty quickly and not having my daily pot of coffee is seriously making me bleh and sluggish.