Some Thoughts On Error Handling

How to handle errors is one of the things that as creators of IT solutions, I think we should spend some time thinking about.

There are two parts to this though:

  1. How do you know when an error happens?
  2. What to do about it?

This has been playing on my mind a bit recently, but I’ve come up with a solution that works for me, for now, and will until I have many more customers.

I’m writing a NodeJS app, and use a central logging service that has the ability to log to multiple destinations – the command line console, a log file, and 3rd party services.

So I’ve set up Papertrail as one of those services. Others are available, but the price, bandwidth, and functionality of Papertrail met my needs.

They have an alerting system whereby you start by searching your logs, then save that search, then set up an alert on that search for the future. The alerts can be via many channels, one of which is email.

So yes, I get an email when there’s a critical error on the site.

It’s not fancy. It’s not sophisticated. It’s not scaleable. But it works. It’s cross-platform. And I can get them when I’m out and about.

That’ll do for now.

Similar Posts