Question: We booked a ticket from Washington to the Bahamas recently through Expedia. It was a code-share flight Bahamasair (www.bahamasair.com) operated by US Airways.

At the US Airways check-in counter we, and about 50 other travelers, were told by US Airways ticket agents that Bahamasair had not transferred the ticket information to the US Airways system and so none of us could board.

After four hours of pleading, arguing, and begging with US Airways and Expedia, we gave up and went home. By that time we couldn't book any reasonably priced flights to our destination in the Bahamas.

At a minimum we will lose the rental fee for the place in the Bahamas and we're worried we'll also lose the $1,400 we paid Bahamasair. Multiple phone calls to Bahamasair have been unsatisfactory.

This was a genuine travel nightmare. Can you help us?

— Jay Middour, Alexandria, Va.

Answer: Bahamasair should have gotten your tickets right with US Airways and when it couldn't, the airline or your travel agent should have fixed it.

Code-sharing, an airline industry term for lying, allows an airline to sell seats on another airline's flights while claiming it's the airline's own flight. In your case, you purchased tickets through Bahamasair, but the flight was actually on US Airways. When something went wrong, it seems no one took responsibility.

I'm a little surprised Expedia couldn't come up with a better solution than to cancel your flight. The online travel agency's well-promoted "Expedia Promise" guarantees the trip you booked "will meet the descriptions on its site and in your itinerary." If a mistake is made, it says, "We'll take responsibility — at no additional cost to you."

The way I see it, Expedia should have either imposed on Bahamasair or US Airways to fix their little code-sharing glitch or bought a new flight to the Bahamas the same day. You certainly shouldn't have had to spend hours pleading.

How could you have avoided this? I would tell you to avoid code-sharing flights, but in this day and age of airline partnerships and alliances, it's practically impossible. But the code-sharing arrangement should raise a red flag. (When you're booking one, it will say, "Operated by US Airways," for example.)

When you're on a code-sharing flight, it means you need to be extra careful. Don't just call your airline to confirm - call the airline operating the flight. A system error like this, while rare, might be caught with a simple call.

If you're stuck in a situation like this again, politely ask the Expedia representative to escalate the call. You can do that by calmly asking to speak with that person's direct supervisor — not "a supervisor" or "someone in charge" since that can be interpreted in many ways and could land you with an agent's colleague who will proceed to tell you it can't be done.

Also, it helps to be aware of the "Expedia Promise," the online agency's guarantee that it will take care of you.

I contacted Expedia on your behalf. A representative apologized for not being able to assist you on the day you traveled and helped you secure a refund from Bahamasair. Expedia also sent you a $200 check and a $200 credit to make up for the trouble.

Christopher Elliott is the author of "Scammed: How to Save Your Money and Find Better Service in a World of Schemes, Swindles, and Shady Deals" (Wiley). He's also the ombudsman for National Geographic Traveler magazine and the cofounder of the Consumer Travel Alliance. E-mail him at chris@elliott.org.