Corrected error handling in worker onmessage callbacks.