-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hi,
Thanks for the library.
I can see there is an event listener to catch global "error" events, but not on global "unhandledrejection" events.
E.g if my worker code does something like below, it won't get handled by the registerError callback.
const test = function() {
return new Promise(function(resolve, reject) {
setTimeout(() => {
reject(new Error("test error"))
}, 5000);
})
}
test();Would it make sense to add a global listener for that, e.g. could just "re-throw" that error
self.addEventListener("unhandledrejection", function (e) {
e.preventDefault();
throw e.reason;
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels