Greg Tyler

Weeknotes: 25th November 2019

Published on 1st December 2019

This week I fixed a lot of PHP errors.

Last week I talked about how I was reviewing logs and errors. We wanted to increase our error logging strictness so that we get properly notified when things go wrong.

After implementing the stricter rules though, we found lots of existing errors. We obviously don’t want to be unduly notified, so I spent a large chunk of week fixing a lot of them.

For the most part, this was simply a case of downgrading errors from RuntimeExceptions to HttpExceptions, which Symfony gracefully turns into 403 and 404 errors.

The other major piece of work was deciding where errors should be thrown. For example, a report not being found is not really an error state, but a user who has no reports indicates that something has done wrong in our data process.