Preterm labour

Ally

Went into L&D and my OB confirmed I was in very early stages of preterm labour with my contractions showing on the monitor and he prescribed me idomethacin to take at home as well as I needed a dose there until contractions stopped, is this safe to take does anyone know? When I go on google it has scary side effects for baby, he prescribed it to me for two days and strict bed rest and I know the dr obviously thought the benefits outweighs risks here but I’m still scared