filecoin-station / zinnia

Runtime for worker nodes executing modules in a resource-limited sandbox
https://crates.io/crates/zinnia
Other
17 stars 2 forks source link

Allow modules to handle uncaught errors/unhandled rejections #518

Open bajtos opened 4 months ago

bajtos commented 4 months ago

Implement globalThis.addEventListener("unhandledrejection", (event) => {}), see https://developer.mozilla.org/en-US/docs/Web/API/Window/unhandledrejection_event

This will allow Voyager to graciously handle global errors escaping from the Saturn client and prevent the module from frequently crashing.

Related:

Consider reverting the following changes after we update Voyager to not crash on uncaught errors from Saturn: