Add a unittest for custom error handlers