Not only was he distraught because he made the mistake and wanted to correct it, he was also worried that, despite five years of excellent service to the company, his career could be in jeopardy.
The first reaction most people have when they make a mistake is purely defensive: They seek to place the blame on someone else. Not only is this counterproductive, but the customer rarely cares who within the organization made the mistake -- it is still the company's mistake.
And it is a waste of the customer's time for the company to try to figure out who did it. There will be a more opportune time to dissect what happened after the blunder is fixed.
The company's first course of action should be to determine what the customer wants it to do about the problem and try to accommodate that solution.
When you feel you deserve the blame, it's best to accept it and go out of your way to handle the situation. My friend did just that. He worked almost around the clock for several days following the incident to turn the situation around.
At first, he spent a lot of time beating himself up, second-guessing his decisions and feeling low. Still, I assured him that one mistake, albeit a huge one, did not cancel out the many contributions he had made to the company over the years -- contributions that were frequently mentioned and recognized by his peers and supervisors.
By acknowledging that he could've done better, working untiringly to fix the problem and not pointing the finger at someone else, which he could have done, he salvaged his credibility and his career.
As the dust cleared and a more thorough examination of the project was conducted, all agreed my friend wasn't totally to blame for the mistake. But it didn't really matter. He had saved the day for himself and the client.