restore the error handle before running test