Bug spray while pregnant

So I noticed some ants in my house so I sprayed them with a bug killer spray, I didn't really think about if it would be bad or not. But now I'm wondering if it is bad for the baby? I'm almost 28 weeks