The Leadership Insiders network is an online community where the most thoughtful and influential people in business contribute answers to timely questions about careers and leadership. Today’s answer to the question, “How should you react after making a big mistake at work?” is written by Shadan Deleveaux, co-founder of Technology For Families in Need.

So you messed up at work, now what?

Some years ago when I was a young marketer I was given the opportunity to manage a hair care brand. I was thrilled. By the company’s standards, the brand was small, only generating a few million dollars a year in revenue, but it was incredibly profitable and most importantly it was mine to run. I had recently finished my MBA and I felt like I was finally getting the opportunity to put what I’d learned in school to use. Eager to make an impact I jumped in and promptly made one of the largest mistakes of my professional career.

The details of my mistake are intricate, uninteresting, and at this point irrelevant, but suffice to say I let my inexperience get the best of me. I blindly took the advice of a colleague with different objectives than mine (a major ‘no no’ in business) and it resulted in a situation where my brand was out of stock on its top selling item. This product was the cash cow, the money maker, the product that our distributor couldn’t keep on the shelf because it sold too fast.

Because of my error, we had none to sell, for two to four weeks, representing a significant revenue shortfall. Imagine for a moment the feeling of being the new person on the job and you just cost the company a lot of money. I felt every cliche you could possibly imagine. I saw my life flash before my eyes, my heart was in my throat, I had a feeling in the pit of my stomach and my soul left my body. I just knew I was going to get fired, but before that happened I had to try and salvage the situation. I hope nothing similar ever happens to you, but just in case it does, here’s what you should do.

Take ownership.

Own your mistakes. Whether you are a team manager or an individual contributor, in corporate America there’s nothing worse than a person that ducks responsibility. It shows a lack of professional maturity and judgment.

Everyone makes mistakes. It shows trustworthiness and character to take responsibility for those mistakes instead of hiding behind others, or worse pretending that they didn’t happen. Think about the people in your professional life that you respect the most. They’re not perfect, of course, but they probably have very strong character and taking ownership of mistakes is one of the fundamental ways a person can show that they have strong character.

Take action

Taking ownership is important, but it is just as important to not passively wallow in the mistake. It does more harm than good to your professional reputation if all you do is admit mistake after mistake without providing any solutions. You should be using every resource at your disposal to right the wrong. Go above and beyond to find a resolution. This is where your skills as a business person will be tested. Think about the opportunities at your disposal to compensate for the mistake. Now is the time to be incredibly creative. If you are good (and lucky!), there’s a possibility that your creative solution will attract more attention than the initial faux pas.

Take heed

Learn from the mistake. Most smart and progressive organizations are OK with their employees making a mistake, within reason of course. These organizations understand that to foster creativity and new aspirations, you have to create room for the occasional mistake to be made. On the other hand, very few organizations are OK with repeated mistakes, especially the same mistake repeated more than once. Dissect each mistake and learn from it. Think about what should have been done differently to deliver a larger chance for success. You may want to get input from people outside of the specific situation, sometimes we are blinded by our own proximity to our problems.

As for me, I did not get fired, we were able to work with our plants to expedite manufacturing and reduce the time the item was out of stock. We also created additional incentives for our major distributor to purchase more once we were fully stocked.

In the process, I learned an incredibly valuable lesson. Moving forward, I will always ask more questions and seek to understand someone else’s incentives when they give me professional advice. Understanding their lens and perspective is critical to putting their advice in the proper context.