Anyone have food poisoning while pregnant?

Last night I was cramping so badly I couldn’t walk. I could tell it was gas and needing to go to the bathroom. I thought I was going to have severe diarrhea but ended up being constipated and struggling to go. I eventually threw up after several bouts of cramps. After I was able to have several hard stools I had a softer one and then was able to fall asleep. I don’t honestly know if it was a stomach bug or food poisoning. I thought it was constipation pain but I threw up as well? Haven’t thrown up once during this pregnancy and I’m 21 weeks. I did leave a message with my midwife but haven’t heard back. Should I be concerned about baby? If it’s food poisoning how do I know if baby was affected?