test error handler