Throwing up blood?

I’m almost 16 weeks pregnant. Before I found out I was pregnant I was scheduled to have a scope done to see if I had a stomach ulcer possibly well that got canceled because I found out I was pregnant didn’t have anymore problems but just had ulcers in my esophagus and my throat a lot now I’m throwing up almost all day can’t keep any food down throwing up foam and stomach bile that had a little blood in it.. what steps should I take or should I be worried?