Ask HN: How do large engineering teams manage application exceptions?
Over time, the number of exceptions in our infrastructure grew, the number of 3rd-party dependencies also grew, the traffic to our website increased 10X, and as a result the quantity of exceptions has made it difficult to parse the signal from the noise.
My question is: how do other engineering teams manage their exceptions? I don't want to ignore exceptions that could be real issues that we should be fixing and I also don't want to litter our code with code that does nothing other than prevent non-harmful, non-user generated exceptions as that would be layering on complexity to our codebase.
We tried a new approach recently, based on a spreadsheet + a few lines of Google app script. Basically we elect a “Bug Master” every week whose responsibility is to sort the bugs. This worked ok for a while but engineers don’t all have the same involvement, aren’t always available, they might be in a rush to release something, busy with meetings, etc. And in the mean time, exceptions stack up. Potentially, important ones.
Any insights would be greatly appreciated as we're trying to find a more sustainable and scalable way for our team to handle exceptions.
5 comments
[ 3.0 ms ] story [ 22.8 ms ] threadYet if you feel the need to triage exceptions, you probably have too many of them! you should strive have 0.
If you treat every exception as a disaster, your team will have a better sense of urgency. Have your system send an email to everyone on board.
That's how we do it. Exceptions are only acceptable if they are exceptions (machine/network crash) and can't be recovered from... In which case we let the process crash and restart it.
Non harmful exceptions is a concept I don't get though...
But also, and I agree with other people here, your app shouldn't really be throwing exceptions that are uncaught full stop (unless it is not user-facing or that important) so it's worth fixing that too. (Unless you are writing Erlang or something where the failure model is different.)
In other words, code should be tested for not handling exceptions just like it is for handling them.
Good luck.