antibiotics during pregnancy

I feel like the worst mum already I have just finished a round of antibiotics (I brought the generic brand) & the problem is still there so I had to get a repeat from the doctor. I fell bad enough taking antibiotics while pregnant let alone when I asked the doctor if it was okay that I get the generic brand again she said "no don't risk it" has anyone ever taken genetic antibiotics or normal antibiotics while pregnant & was your baby okay? Please state what one you took. One worried mumma!! Any opinions welcome I'm stressing out😩😔