Is there a way to gracefully handle situations where a WS message exceeds the maximum size? Right now I just get a warning in the logs and a closed WS channel, that's it. In the current version of my code, any client that gets disconnected immediately attempts to reconnect. It would be nice to let those clients know that the previously sent message was too large.
Seems like it's a double whammy as in the browser I get 1006 and the error event has no details. But it's better than nothing as I can at least distinguish between reconnections because of the server or the network and reconnections because of WS misuse.
is it logging an exception? maybe a manifold catch would work?
Doesn't seem like it: https://github.com/clj-commons/aleph/blob/master/src/aleph/http/websocket/server.clj#L90
There is a web socket close code specifically for too large messages
https://netty.io/4.1/xref/io/netty/handler/codec/http/websocketx/WebSocket08FrameDecoder.html#L438 should result in a 1009 close status, but not sure how aleph might set the close on protocol violation stuff, and because it throws right after, I am not sure how that would interact with aleph's closing in the exception handler
Ah, alephs handler is in the other direction from how that exception travels, so alephs handler isn't likely involved at all