Error handling in web workers