Add errrorhandler for test