angular-websocket icon indicating copy to clipboard operation
angular-websocket copied to clipboard

Error code of failed handshake

Open RavisMsk opened this issue 9 years ago • 2 comments

Hey, thanks for the great module.

Is there any way to get response codes or even full response when WS handshake fails? At the moment, I'm using websocket with authentication using tickets, and when something is wrong, im sending back http codes 404, 403, or some other. On the client-side I have to show user the reason, that depends on response code.

Thanks in advance.

RavisMsk avatar Jun 03 '15 13:06 RavisMsk

+1

ukupat avatar Apr 08 '16 09:04 ukupat

+1
There is a workaround to close ws connection with custom close code (4000-4999) as defined in RFC6455 section 7.4.2. It's not so good because it requires to open connection. And it would be really nice if we could handle the HTTP response code.

anatoly-kussul avatar Dec 20 '16 14:12 anatoly-kussul