Fun with British Airways

Luke | Nov 17, 2024 min read

I just returned home from a rather lovely work trip to South Africa to meet some of the team that I work with there on a regular basis.

During my time there I’d spent a fair while with a newer developer in the team trying to help teach him a few tips and tricks to be a better coder. There was one approach in particular that I’d hope would stick.

When it came for my UK colleagues and I to travel home, an unexpected chance to demonstrate that approach suddenly emerged…

Sorry, something went wrong

Having checked in the night before, I came into the office on our final day and asked one of my colleagues if they’d done the same. It turned out they hadn’t.

It’s quick and easy enough to do so usually, but when they came to the seat selection page they found it was consistently returning an error: sorry, something went wrong.

After a few attempts they became worried and called the company that had booked the flights to try to sort things out.

The company said they’d call back in half an hour, but that came and went with no sign of a reply. For reasons I won’t go into here, he needed to make sure he got home that evening.

Concerned, he called the travel company again.

After a fairly lengthy phone call he was told that there had been an “administration error” on the British Airways side and that the company were doing all they could to resolve it prior to us getting to the airport. Do not worry, we were assured, all would be fine.

All was in fact, not fine.

Dig a little deeper

It was at this point that I found myself wondering what else I could dig up from their fairly simple looking check-in site. How exactly was it that “something went wrong”?

I opened up Chrome and got my colleague to try checking in from my machine with the debug panel open. Lo and behold the network tab spat out a pretty informative response from one of the HTTP calls…

Something went wrong my arse

I’d heard rumours of airlines overselling flights intentionally before and this seemed to suggest that’s what they were doing here.

A few minutes later we one of the other people traveling with us turned up. He’d also not checked in so we got him to try it.

It worked.

Okay, so this suggested it may not be overbooking. If it was then someone who checked in later would also have gotten the error message due to the flight being overbooked, surely?

I decided to see if I could find anything else hidden in their HTTP calls and responses on the page.

You can always go further

Sure enough, with a little extra digging I was able to find another, more detailed payload coming back from the British Airways APIs.

Bumped down to economy

There was a whole host of information in here, but the most important thing was the cabin allocation. Clearly it says economy, but we were only premium economy, so perhaps they differentiate economy from premium economy via the cabin code.

A quick bit of googling showed that the ‘M’ cabin code is still standard economy.

Now we’ve got enough information to conclude one of two things: they’ve overbooked the flight and already bumped him down to economy; or they’ve somehow booked him into economy internally and caused the system to mess up.

Armed with this new knowledge, we tried calling back the booking company to see if anything could be done.

The moral of the story…

I would love to say that everything worked out perfectly because of the extra digging I did. Sadly we still got stony silence from British Airways. We still got told to arrive at the airport several hours earlier than normal only to find that there weren’t actually any British Airways staff arriving until check-in opened. We still had to wait patiently in line only to be told that my colleague probably wasn’t getting on the flight because they’d overbooked it - and that he’d only find out 20 minutes before the plane took off.

If there is a moral to this story, it’s not to fly with British Airways. Ever.

If there’s a second moral to this story, it’s that you can always dig a little deeper when it comes to software engineering. And usually, you’ll find something useful or insightful when you do.

You can always go one level deeper when debugging a problem, understanding a new code base, or learning a new framework. So next time you’re face with a problem that isn’t quite making sense, trying going one level lower to see if it helps broaden your understanding of what’s going on - you never know what you might find.

…and in case you’re wondering, he did manage to get on the plane and we even got lounge access to boot!