fix unit test errors for errorhandler