#303·websocat

Proper Errorcode reporting

Author: yassinebenarbiaCreated Jan 20, 2026Updated Jan 21, 2026
Labelsenhancement

Story

I was implement a WS server and tried using websocat to debug it but ran into this error message:

bash
websocat: WebSocketError: I/O failure
websocat: error running

After spending hours of debugging, I tried using other clients (claws ) and it turns out that it's an abnormal connection closing (error code 1006) which what websocat failed to convey.

Suggestion

Implement proper error message handling with informative error messages, or at least include a status codes (from RFC) in the so people can lookup the problem.

For Reference:

https://www.rfc-editor.org/rfc/rfc6455.html