Describe the issue
The SocketClient._connect() function sets up a bunch of StreamSubscriptions on _messages that don't have any onError callbacks. For example #1228 will result in multiple unhandled exceptions that can't be caught by the user of this package.
To Reproduce
Make GraphQLSocketMessage.parse throw any exception
Try to catch it from any application that tries to create a ws connection
observe the mayhem
(optional) Change Stream<GraphQLSocketMessage> get _messages => socketChannel!.messages; in SocketClient
to Stream<GraphQLSocketMessage> get _messages => socketChannel!.messages.handleError((e) => print("Getting errors ${e}"))
Expected behavior
Exceptions from SocketClient should not escape _connect() or the user should be able to catch them.
Describe the issue The
SocketClient._connect()
function sets up a bunch of StreamSubscriptions on_messages
that don't have anyonError
callbacks. For example #1228 will result in multiple unhandled exceptions that can't be caught by the user of this package.To Reproduce
GraphQLSocketMessage.parse
throw any exceptionStream<GraphQLSocketMessage> get _messages => socketChannel!.messages;
inSocketClient
toStream<GraphQLSocketMessage> get _messages => socketChannel!.messages.handleError((e) => print("Getting errors ${e}"))
Expected behavior Exceptions from
SocketClient
should not escape_connect()
or the user should be able to catch them.