DenoDDeno
Powered by
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);
})
app.addEventListener('error', (e) => {
    const lowerMsg = e.error?.message?.toLowerCase();
    if (lowerMsg?.includes('early eof')) { return }
    console.error(e.error);
})
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Oak Signed Cookies error
HappiePlantHHappiePlant / help
17mo ago
Deno testing with local oak server
fobbanFfobban / help
3y ago
oak server can't accept requests from another server?
xanderjakeqXxanderjakeq / help
3y ago