Blog Home » Debugging Stories and Comfy Pants

Debugging Stories and Comfy Pants

By Todd H Gardner

There is one big advantage to us all working from home: comfy pants. No more dress code, no more business casual. You might not be wearing pants at all! Bugs don’t care if you wear pants, but your team might.

Let us set you up with WFH-Approved™ comfy pants. Tell us a story on Twitter about debugging a client-side problem and we’ll send you a FREE pair of At Least I’m Wearing Pants comfy joggers.

TrackJS Joggers

Some restrictions apply, but not in these pants.

Our Debugging Story

Our monitoring on this site reported a bug to us last week, Unexpected token < in JSON at position 0. This is a fairly common message, indicating that we made a network request expecting a JSON response, but we got an HTML/XML response. Usually an error page.

The error happened on our global error stats page. We make an AJAX call to an AWS S3 bucket where we keep the public statistic data, but the request returned 403 Forbidden. The file was missing!

We have an internal job that calculates the error statistics once a week and publishes this file to S3, but we had not recorded any failures.

Diving into the logs, we discovered that S3 had not responded when we attempted to upload the statistics file. Perhaps they had a service blip, or the network was temporarily unavailable, but we didn’t handle this correctly.

This failure was a gap in server-side logic that manifested as a client-side error. Luckily, TrackJS caught the issue as soon as it happened, so we could investigate and fix it. TrackJS acted as the last line of defense in understanding the real user experience of our site.

We re-ran the job and fixed the glitch to prevent it happening again.

Your Turn

Now it’s your turn to tell a story about squashing an epic bug. Share your debugging story on Twitter and we’ll build out your new WFH wardrobe with these stylish TrackJS joggers. You wouldn’t go out in them, and that’s the point.

Todd H Gardner
Todd H Gardner
CEO and Cofounder