-
When we worker = new Worker(new URL('./worker.ts', import.meta.url).href, {
type: 'module',
});
worker.onerror = (error) => {
console.error(error);
}; What is the correct way to handle worker errors for Deno? Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Answered by
korywka
Apr 1, 2025
Replies: 1 comment
-
Looks like adding |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
korywka
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like adding
error.preventDefault();
helps to prevent Deno crashing. Kudos to ChatGPT and I wish Deno docs mention this too.