hapijs / nes

WebSocket adapter plugin for hapi routes
Other
502 stars 87 forks source link

Is there a way to suppress error messages in the logs when a client disconnects? #192

Closed nfriend closed 6 years ago

nfriend commented 6 years ago

When a client disconnects, I get this error message in my Hapi server's console:

170928/120436.817, [log,connection,client,error] message: read ECONNRESET, stack: Error: read ECONNRESET
    at exports._errnoException (util.js:1022:11)
    at TCP.onread (net.js:569:26)
[2017-09-28 09:04:36.819] [ERROR] console - Debug: connection, client, error
    Error: read ECONNRESET
    at exports._errnoException (util.js:1022:11)
    at TCP.onread (net.js:569:26)

Is there a way to suppress these messages? I took a look through the documentation and the existing issues on this repository but couldn't find an obvious solution.

ambrons commented 6 years ago

@nfriend is this specific to NES? or are you talking in terms of hapi in general? I'm seeing quite a few of these messages in Hapi's server logs, but it has nothing to do with NES or websockets.

nfriend commented 6 years ago

@ambrons - Yes, this is specific to Nes. The error message gets printed when the browser ends the Websocket connection to the Hapi server (for example, when the tab is closed).

JKHeadley commented 6 years ago

I'm experiencing this as well. Does anyone know an easy way to at least catch and handle the error?

JKHeadley commented 6 years ago

Looks like this was fixed along with #206.

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.