Adding test for error handler in workers