This is a story about traveling with small children, a simple mistake--and customer service.

It's a truly stunning tale, but I'm going to give away the ending: After everything, United Airline found the passports. (That will make sense in a minute.)

First: a San Francisco family on United Airlines--mom, dad, and 3-year-old--were locked in a French immigration detention center overnight and deported to the U.S. last week, after a simple mistake that I suspect many people could imagine making.

But while they acknowledge they messed up, the family blames a United Airlines employee for allegedly making the outcome much worse than it had to be.

Here's what allegedly happened, plus a lesson for any business owner who might think they're technically right--but who also realizes they're dealing with an angry, sympathetic customer.

Missing passports

I first heard Daryl Guieb's story on a local newscast in San Francisco. We talked at length on Friday.

Guieb is a California software engineer who works for a French company called Ivalua. With a business trip to Paris scheduled just as his wife would be turning 25, they decided to make a vacation out of it, taking their 3-year-old daughter along.

The flight from SFO was an 11-hour redeye. As Guieb put it, they were "excited" when they landed at CDG in Paris, but "within about five minutes," he realized his family's passports were missing.

His quick conclusion: "We'd left them on the plane."

Guieb ran back and asked to to grab them, but was told he wasn't allowed. A United Airlines employee did spend a few minutes looking on the plane, but she returned to say that the documents weren't there.

Stressful enough, right? Then Guieb says, the United Airlines employee implied that he was being untruthful, "accusing us of not having passports, or saying it was in our backpack or we checked [them] or something."

Her suspicion allegedly created a cascade of troubles over the next 36 hours.

What's more, as it turns out, she was 100 percent wrong.

'You're immigration's problem now'

I'm going to give away the very end of this story. After everything described below, United Airlines found the passports. It seems likely they were on the plane, right where Gulieb told the United employee he'd left them.

But now, the French immigration authorities got involved. Guieb said he understands French pretty well, and he listened as the United employee told police that she suspected he was not being truthful.

That suspicion, he believes, led the French authorities to treat his family as immigration criminals, rather than as lawful visitors who needed help dealing with a paperwork problem. And that in turn led to detention and deportation

"If the United employee didn't accuse us and dismiss our claims, it would probably have been different," he said.

I asked United Airlines for comment. They responded with a statement:

"French law does not allow passengers to return to the aircraft after leaving an international flight. However, we are reaching out to our customer to better understand what occurred."

'I swore on my life and my daughter's life'

For Guieb and his family, the next 36 hours were extremely difficult.

"I swore on my life and my daughter's life and was begging them, please look on the plane. They had to be there. We never went anywhere else," Guieb told me.

But, mom, dad and toddler were taken into custody. They were in the French "system," now, locked up in a detention center overnight.

"They took all our belongings, our phones, our laptops, our tablets," Guieb said. The facilities were "unsanitary" and cold. Guieb and his wife got no sleep, using the few blankets they had to try to keep their daughter warm.

"Toilets were shared. It smelled, 20 to 30 people," Guieb said, adding that he was in "constant contact" with both the U.S. embassy and his French company from a pay phone, trying to get emergency travel documents.

But, he learned, once they'd been processed into the French detention center, the only way out was to be deported back to the United States.

'A little traumatized'

They next morning, French police drove the Guieb family back to the airport and put them on a United flight to San Francisco. They weren't allowed to access their luggage or their phones until they were back on U.S. soil.

One day later, however, Guieb said United Airlines notified him with a form message that it had found the passports, and wanted $20 to cover shipping to return them.

The travel documents were sitting at Dulles Airport in Washington--which Guieb says was the next destination of the plane they'd flown to Paris..

Guieb says he's talking with lawyers. Besides the cost of the flight, his family wound up charged for hotels and other attractions that they couldn't use in France.

And he said, his three-year-old daughter is "a little traumatized. ... She doesn't want doors to be locked," and refuses to sleep in her room alone.

Legally right versus morally right

Let's assume that Untied is right about French law, and also let's presume that the United Airlines employee who went back on board to look for the passports really gave it a good effort.

In other words, let's assume that the immediate problems--forgetting his family's passports on an airplane--were all Guieb's fault.

If you've ever traveled on an international flight with a toddler, you understand the chaos. I suspect maybe you're hearing this story and thinking, "Maybe he messed up, but there but for the grace of God go I."

What should United do, if anything? That's their choice. Sometimes, even if you're legally right, it makes sense to offer kindness and compensation anyway.

At first, Guieb says all he really wanted was a sincere apology for his family's trouble, and some kind of compensation. My sense is that he is now growing angrier by the day.

Meantime, he says he has an immediate problem he wants to get resolved. Before this whole debacle, he said he'd already booked his family's next vacation, to Hawaii.

The airline? United. He wants to cancel the tickets and get a refund. So far, no dice.