Saying I could miscarry at 14 weeks because

Saying I could miscarry at 14 weeks because I have a ecolei UTI I'm not sure how you spell it and they gave me nitrofurantoin mono. Is that really safe. Any advice please I'm freaking out I dont wanna lose my baby. 😭😭😭