Also make error handling a class method as it is not bound to the controller instance