modified events controller so that it doesn't hit the db until there are no errors