38 weeks and two days with pains

Maria
This is my first pregnancy so everything is freaking me out. Yesterday after having a small piece of carrot cake I started to feel some pain on either side of my stomach. It was quite sharp and felt like a bad sharp cramping pain. I ended up going to sleep but only for a few hours. I also went to use the rest room and had a sharp uncomfortable pain at the top of my stomach and every so often I get a reoccurrence of pain on the sides. I also have gestational diabetes so I'm worried about eating the piece of cake. Is this Braxton Hicks? I haven't lost my mucous plug and my water has not broken either...