SkepticMysticS
Denoβ€’4y agoβ€’
4 replies
SkepticMystic

Silence error logs on Oak server

I'm trying to silence specific errors on an Oak server on Deploy.
A Github issue said to add an 'error' event listener to the app.
I did the following, but the error is still logged. Am I missing something?

app.addEventListener('error', (e) => {
    const lowerMsg = e.error?.message?.toLowerCase();
    if (lowerMsg?.includes('early eof')) { return }
    console.error(e.error);
})
Was this page helpful?