Bug Found & Fixed

29 Mar 2019

There have been record number of visitors to the Downtime Monkey website 3 months running and this is great - thanks to everyone who is using our service!

A knock-on effect is that a couple of minor bugs were brought to our attention - they were both edge-cases that only showed up in specific circumstances. Here are the details of the first one...


Unnecessary Warnings Output On Page

Users from some countries noticed a warning output at the top of the home page the first time they visited the site.

The error message was along the lines: "IP API failed to open stream - too many requests" but with some programming jargon thrown in.

What was the cause?

Since Downtime Monkey is a worldwide service we deliver different content to users in each country. For example, users in the United States want to see prices in US$, users in Europe want to see prices in € and users in Bermuda want to see prices in BD$ while sipping drinks at the beach.

To deliver the correct content the site checks the IP address of the user, uses an API to find their country and serves them the correct page.

Occasionally though, our first choice of API is busy. No problem - in this case we have a fallback (and a fallback to the fallback) where another API is used.

However, what we didn't notice was that, under some circumstances, when the fallback was needed a warning was output to the page. Obviously this didn't give the best user experience - the warning wouldn't make much sense to anyone who isn't a web developer and the site was working fine so no need for a warning at all!

Why was it missed?

It was missed because the warning was only seen by users in a few countries (it was specific to certain country pages), only when the API fallback was needed and only the first time a user visited the website.

Easy Fix

Once we were aware of the bug it was easily fixed - no more unnecessary error messages.

We'll bring you details of the other bugfix in our next blog - watch this space...