fix error handler in test.html