Sharp pain

I’m 24 weeks & 4 days. I woke up all of a sudden this morning with sharp abdominal pain. The pain radiates from right under my ribs to a little below my belly button. I go to bathroom I’m definitely not constipated. Then I threw up. But pain continued for 2-3 hours after. I couldn’t get comfortable I couldn’t sleep. Finally drifted off to sleep. I still feel bad. Still feel nauseated. I called my dr. They didn’t really say what it could be. But said if pain continues to go to l&d to get checked.

Has anyone had this? What was it?