SkepticMystic
SkepticMystic•3y ago

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);
})
app.addEventListener('error', (e) => {
const lowerMsg = e.error?.message?.toLowerCase();
if (lowerMsg?.includes('early eof')) { return }
console.error(e.error);
})
3 Replies
Lext
Lext•3y ago
I got the same problem now. Have you fixed it?
SkepticMystic
SkepticMysticOP•3y ago
I have not found a solution, unfortunately
Lext
Lext•3y ago
😔