My toddler is attached to my husband

I am struggling so much. My 2 year old son is attached to my husband. He’s not feeling well and I can’t console him, all he wants is my husband. I feel like such a failure and a terrible mother for not being able to console my child.