Should you stay married to your partner

If he has a child that appeared now but he had told you about the possibility of having one before getting married... but you did the math and found out that the child was conceived when you guys were 5 months dating. ?? What can be done now? I think getting a divorce is not something I want to do but we didn’t date for long and got married and the kid is as old as our weeding years just now the kid is being part of our lives. The mom is giving a hard time but other than that idk