It was a drama that could have been dreamed up by a scriptwriter and a historic mix-up that will live (infamously) in Academy history.

But it was more than that…

When the Academy Awards accidently announced the wrong winner in the Best Picture category, it was an object lesson in failing to pay attention to detail and grace under fire.

Looking back at the tape, it seems obvious that something was not quite right. Warren Beatty looked uncertain and a little confused as he opened the envelope. Beatty is not only an Oscar winner, he has also been an Academy Awards announcer on several occasions, and is familiar with the routine. Although it’s not unusual for announcers to stretch out the tension of the moment a little, there was hesitancy about the way Beatty looked at Faye Dunaway, his co-announcer.

Unfortunately, Dunaway misread her partner’s cues and, giving only a cursory glance at the contents of the envelope, enthusiastically and incorrectly announced the winner as “La La Land”.

In fact, as 35 million viewers saw, Beatty had mistakenly been given the wrong envelope – a first in the Academy’s history.

Moonlight had actually won. Even worse, “La La Land” producer Jordan Horowitz had already begun his acceptance speech when he was told what had happened. It must have been a moment of incredible shock and crushing disappointment, but Horowitz handled it with grace, dignity, and leadership.

Taking control of the confusion on stage, he seized the mic and announced that “Moonlight” had won. When he realized that the confusion and shock weren’t allowing clarity for the audience or the performers, he snatched the winner’s card and held it up to the cameras to make it clear. Then he led his cast and crew offstage, clearing the way for “Moonlight” to receive their Oscar.

Most admirable about Horowitz’s actions was the way he made sure that “Moonlight” had their chance to receive the accolades they had earned without, in any way, seeking to detract from their shining moment by casting “La La land” as a victim.

Following Horowitz’s lead, the host for the evening, Jimmy Kimmel, tried to deflect the tension with a few jokes as he blamed himself for the error – which he had no part in. By shifting the focus on to himself, Kimmel deflected the possibility of finger pointing and put the show back on track.

In fact, it turned out to be one of the auditors from Pricewaterhouse Coopers LLP, the accounting firm that has long been responsible for counting Oscar ballots, who had handed over the wrong envelope in a moment of distraction. Continuing the pattern set by Horowitz and Kimmel, PwC issued a straight-forward apology to the producers and casts of both films and to the Academy, and vowed to investigate the mistake and ensure it never happened again.

In business, the occasional failure or mishap is inevitable. While mistakes are an unpleasant fact of life, what matters most is how an organization handles them, and the cue for that comes from the leader.

Own the mistake; apologize for it in a direct and uncompromising manner; fix it; examine the circumstances that led to the mistake; and develop protocol and systems to ensure there is no recurrence.

And then, like Jordan Horowitz, lead your team on to your next adventure.