graphql-client
graphql-client copied to clipboard
WebSocket close status and reason not handled
When the ws socket gets closed by peer, a closeResponse object is created but never used. As the peer also is able to specify a close status + reason if would be nice to fetch these as well.
Today an exception is thrown with the message "Connection closed by the server", making it hard to take action as the reason for closure isn't known. My proposal is to throw a custom exception, including the close status, reason and the closeResponse message.