An upstate mother spent three nights in jail due to a “clerical error” on an arrest warrant, which was supposed to be for her ex-boyfriend — after he allegedly failed to pay child support for their two sons, a report says.

“I just missed three days of my life, plus Easter with my children,” said Jessica L. Donovan in an interview with the Times-Union. “It was rough … I felt so degraded.”

Donovan, 35, had been involved in a minor dispute at a local pizzeria near her house in Colonie when cops first encountered her last Friday. She was reportedly arguing with workers over a free pizza she claimed to be owed.

Authorities were called and Donovan’s name was eventually run through their law enforcement database. Police saw it listed under a Family Court warrant — which was supposed to be for her ex, John Gannon Jr., for his alleged failure to pay child support — and took her into custody, according to the Times-Union.

Hill tried telling the cops that they had the wrong person, but they allegedly weren’t listening.

“I said I have custody of my kids,” she remembered. “They told me the date of the warrant, and I said I was there that day when they signed the warrant (to arrest Gannon). I said ‘I have proof’ … but they wouldn’t take my proof.”

Officers down at the Colonie jail who spoke with Hill apparently saw how upset she was over the arrest and called the Albany County Sheriff’s Department to confirm the details of the warrant. That’s when they found out they had the wrong person.

“The guys had an inkling there might be something wrong with it,” explained Colonie police Lt. Robert Winn. “But at the end of the day we tried everything in our power to make sure we had the right person.”

Family court officials said they were “mortified” by Hill’s arrest and investigating the incident.