Last month, we made a huge mistake.

We’d built a new feature in Know Your Company a while back. During that process, we’d accidentally written a bit of code that caused private responses to be revealed to new employees in a company.

This means that for the past six months, when new employees were added to Know Your Company, they were able to view responses that only their CEO was supposed to have access to.

Ugh.

It was a horrible mistake… and we were just finding out about it now. It affected about 80 companies, and hundreds of employees. My stomach still feels sick when I think about it.

One of our customers noticed the error, and was kind enough to tell us. Aside from that, our other customers hadn’t noticed the problem (or, at least hadn’t told us).

Now I was faced with a big decision… Should I tell our other customers about it?

One could argue that, if customers hadn’t noticed, why say anything? Why rustle feathers, especially when the damage had already been done. There wasn’t anything that our customers could do about it.

Saying something could cause our business harm. Customers might be angry. Some of them might even leave.

Or, we could come clean. I could be upfront about what happened, own up to our mistake, and say how terribly sorry we were. Sure, we risk losing business. But what about the risk of losing the trust of our customers?

Trust, after all, is everything. If you don’t have the trust of your customers, what do you have? If your customers don’t trust you, they won’t be your customers for much longer.

I also thought: If I were a customer, wouldn’t I want to know? As a CEO myself, I would want to know that those private responses had been accessible to my new employees. Even if I couldn’t do anything about those private responses going out, I would want to know that it happened in the first place.

To gut-check myself, I called up Jason Fried, the CEO of Basecamp. I wanted to get his two cents, and make sure I was thinking about this right. (Basecamp originally built Know Your Company, and is a co-owner and advisor to our business).

Here’s what Jason said to me: “I like moments like this. Moments like this are an opportunity to show what kind of company you are. You get to show your customers what you stand for.”

Those words were all I needed to hear.

I knew what kind of company we were. I knew what we stood for.

I decided to personally email the eighty-some CEOs affected by our mistake. In a short note, I explained what we messed up, and how sorry we were.

I offered a small credit as a token of how bad we felt, knowing of course that it wouldn’t make up for it. I gave folks my personal cell phone number and told them to call me anytime if they had questions, concerns, etc.

Then I braced myself for the reaction.

I got a flood of replies from customers. Not a single one was negative. A few folks were concerned (as they ought to be!)

But no one was angry. No one left.

In fact, the response from customers was overwhelmingly positive. People said, “Thank you for letting me know” and, “No biggie, these things happen.”

One of our Dutch customers emailed me saying, “We have a saying in Dutch: waar gewerkt wordt, worden fouten gemaakt that translates to ‘mistakes are made if you’re doing work’.”

Another person replied to me, “We all screw up from time to time. Go have a cocktail ;)”

I even had one customer who said he was so impressed with the email I’d sent, he’d forwarded it to his entire company as an example for how to handle a mistake.

Our mistake became a positive moment for our company. It solidified who we were, what we stood for, and showed our customers that too.

We proved that “putting our customers’ best interest first” isn’t just something we say – it’s something we do. We gained our customers’ trust and confidence as a result.

Mistakes are bound to happen. You’ll never entirely avoid them. So your customers aren’t going to judge you on whether or not you’ve made a mistake – they’ll judge you on how you handle it.

Do you come clean immediately? Do you say how sorry you are? Are you genuine about it?

It’s a hard thing to remember when you’re in the middle of a fire. You’re faced with the prospect that admitting a mistake could cost you customers, your reputation, and a lot of money.

When you’re in that moment, simply ask yourself: “What kind of company are you?”

You’ll know what to do.