A former White House lawyer was stunned by alleged "misconduct" by President Donald Trump's lawyers at the Department of Justice in their prosecution of former FBI Director James Comey.

On Monday, a federal judge determined that the Trump administration's lawyers misrepresented the law and potentially misled grand jury members while seeking their indictment of Comey. The former FBI director was charged in September with two counts of obstruction of justice and lying to Congress. The judge said the DOJ's errors could "imperil" their prosecution, Politico reported.

Ty Cobb, who was a White House lawyer during the first Trump administration, discussed the problems with Trump's prosecution of Comey on CNN's "Erin Burnett OutFront."

"It's really extraordinary," Cobb said. "Misconduct at this level is almost never seen, and the judge was not solely focused on Miss Halligan, but focused on the FBI's wholesale abuse of the Fourth Amendment. They're rummaging around in privileged information and mishandling the privileged information."

"That alone would be a basis to exclude evidence, but it's also a basis, given how intentional it was, as the judge noted given the fact that the FBI General Counsel and the agent who went into the grand jury were both informed prior to the grand jury appearance that they had they had been exposed to serious, privileged information, and they used that to shape their presentation to the grand jury," he continued. "That's fundamentally wrong."