White House press secretary Sarah Huckabee Sanders took aim at Democratic Representative Ted Lieu saying he "should spend less time tweeting, more time doing your job." Twitter, on the hand, pointed out the irony of her remarks given her boss' well-known and well-documented Twitter habits.

The Twitter spat on Tuesday (19 December) occurred after Sanders criticised Democrats for refusing to participate in the Republican Party's effort to reform the US tax code.

During an interview on "Fox & Friends", Sanders said President Donald Trump "would've been happy" to work with Democrats to pass the tax code reform.

"That's something that Democrats shouldn't need to be begged to be a part of," Sanders said. "They should've been begging and banging down the door of the building behind me to be part of this process and to be part of helping more Americans be more successful."

Lieu retweeted a now-deleted tweet from The Hill that incorrectly quoted Sanders as saying Republicans "begged" Democrats to work with them.

"Dear @PressSec: You don't serve in Congress. I do. And I can say with absolute certainty that you are lying," Lieu tweeted at Sanders.

The press secretary immediately shot back saying the post he retweeted was "incorrect" and slammed the representative over his use of social media.

"Dear @tedlieu — I don't serve in Congress, but I can read," Sanders wrote. "If you had read the story, not an incorrect tweet, you would see that what I said was Dems should be begging to help Americans keep more of their money. You should spend less time tweeting, more time doing your job."

Not the one to back down, the California congressman swiftly hit back at Sanders saying he is "confident enough to admit errors" unlike the Trump administration.

"Dear @PressSec: If the Hill tweet was incorrect, then my tweet based on it would also be incorrect," he tweeted. "Unlike the Trump Administration, I am confident enough to admit errors. Also, I dare you to give the same tweeting advice you gave me to your boss."

Trump's @realDonaldTrump account has garnered scrutiny and criticism over his penchant for weighing in on current events, attacking rivals and critics and often making controversial statements on Twitter. The president has also shared questionable content in the past as well.

Meanwhile, Twitter piled on the criticism against Sanders and slammed her as "hypocritical" for lecturing a congressman over his tweeting habits. While many questioned Sanders over dubious statements she has made in the past, others praised Lieu for standing up to her and urged him to keep tweeting.

"Have you met your boss, Sarah?" one Twitter user wrote. Another said: "Do you know who you work for - part-time Tweeter in Chief and part time golfer."

"This may qualify as the stupidest thing she's ever said," one user added.

sarah huckabee sanders
Sarah Huckabee Sanders told off a Democratic congressman over his tweeting and Twitter immediately roasted her for it SAUL LOEB/AFP/Getty Images