Add onerror handler to Worker to see uncaught errors