Feeling awful

I am so early in pregnancy that I kind of forgot this morning....I woke with the worst headache/backache so I took a couple Tylenol 1 w/Codeine.......will my baby be ok?!! I’m kind of freaking out!!!