The New York Yankees declared themselves as buyers prior to the trade deadline, and rightfully so, as they are currently neck-and-neck with the Baltimore Orioles for the AL East division lead.

But in a bit of a twist in the tale, the Yankees were reportedly dangling one of their big-league pieces in left-handed starting pitcher Nestor Cortes as they prepared to bring in a pitching reinforcement, perhaps in the form of Jack Flaherty.

In the end, however, the Yankees were not able to pull off a trade for Flaherty. It was the Los Angeles Dodgers, a team that seems to beat the Yankees to the punch in terms of major acquisitions, that acquired the 28-year-old righty from the Detroit Tigers. Without a replacement waiting in the wings, the Yankees decided to hold on to Cortes past the deadline.

Had the Yankees acquired Jack Flaherty, there was a strong likelihood that they would have traded Nestor Cortes to the St. Louis Cardinals, perhaps for infielder Tommy Edman, according to Bob Nightengale of USA Today. Nightengale even wrote that the Yankees were “on the verge” of pulling these transactions off.

According to reports, the Yankees decided not to trade for Flaherty due to the red flags they saw in his medicals, particularly regarding the condition of his back. Nonetheless, Flaherty is in the middle of a career year, as he's currently sporting a sterling 2.80 ERA that's backed up by his elite strikeout rate.

He would have been an upgrade over Cortes, but at the very least, the Yankees can take comfort in the fact that the 29-year-old lefty isn't too bad of a pitcher himself.

Did the Yankees miss out?

If Jack Flaherty became a Yankee, then New York would have felt more comfortable using Nestor Cortes as an asset to bring in elite defensive shortstop Tommy Edman. Edman is injured at the moment, but he's projected to return later in the year. He would have bolstered the second-base position for the Yankees amid Gleyber Torres' struggles.

Torres is in the middle of his worst season as a professional as he has currently tallied a measly 0.5 WAR (per Fangraphs) for the Yankees in 107 games (New York has played 113 total). His defense has remained a bit suspect. Edman would have given them an elite defense in the middle of the diamond, provided, of course, that his injury recovery goes to plan.

Instead, the Dodgers got Edman, and at such a bargain price as well. They only gave up Miguel Vargas as well as the 17th- and 23rd-ranked prospects in their system to acquire him and Michael Kopech. Could the Yankees not have matched that price?