Context is everything. The New York Times realized this after the fact.

Late Thursday, the Times published a bit of accountability journalism, detailing extravagant expenditures at taxpayer expense on a Manhattan apartment leased by the government and now occupied by Nikki Haley, the U.S. ambassador to the United Nations. Specifically, the article noted, federal interior decorators spent $52,701 on new drapes, including a motorized system to open and close them.

Well, yes. But not exactly.

It’s true, as the story said, that the ambassador’s 6,000-square-foot apartment on First Avenue — often used for entertaining diplomats — has a priceless view of Manhattan. It’s also true, as the story’s lead paragraph states, that the curtains on the picture windows in the apartment were installed “just as the department was undergoing deep budget cuts and had frozen hiring.”

But all of that distorts the actual timing and context of Drape-gate, which the Times — or at least its headline — seemed initially to pin on Haley and the Trump administration.

In fact, readers who merely scanned the headline and photo thinking it was another Trump administration expense-account scandal might have missed several important pieces of information in the body of the story, starting with the sixth paragraph: The drape expenditures were authorized and approved by the Obama administration in 2016. “Ms. Haley had no say in the purchase,” a spokesman for Haley said in the article.

The misleading context provided ammunition to those who perceive the news media in general, and the Times in particular, as hostile to Trump and his administration. Cries of “fake news” began popping up on Twitter not long after the story was published.

Critics contended that the headline, along with a photo of Haley, made it seem that Haley, or Trump’s State Department, was responsible for the expenditure.

The conservative Daily Caller collected tweets blasting the Times for its alleged anti-Trump worldview, topping them off with a headline saying the Times got “fact-checked by its own accompanying article.” was even blunter: “New York Times Spreads Fake News About Nikki Haley’s $52,701 Curtains.”

By midafternoon on Friday, the Times reconsidered.

It also appended an editor’s note, which read, “An earlier version of this article and headline created an unfair impression about who was responsible for the purchase in question. While Nikki R. Haley is the current ambassador to the United Nations, the decision on leasing the ambassador’s residence and purchasing the curtains was made during the Obama administration, according to current and former officials. The article should not have focused on Ms. Haley, nor should a picture of her been used. The article and headline have now been edited to reflect those concerns, and the picture has been removed.”

Reached by phone on Friday, the reporter of the Times story, Gardiner Harris, hung up without comment. He did not respond to follow-up messages.

Times editor Dean Baquet said in a brief interview that he preferred to let the editor’s note correcting the story do the talking. He added, “The main lesson here is, if we get it wrong, we correct it. We own up to it.”

Haley herself retweeted the Times’ tweet about its editor’s note.

The unanswered question in all the hubbub: Why did the State Department, under any administration, deem it necessary to drop more than $50,000 on curtains?