rejected return

My 2022 taxes were rejected because my dependent son was claimed on someone's taxes (presumably my ex-wife's).  Per our divorce agreement, I was to claim my son this year.  What is the best course of action at this point so that I can get my taxes filed?