ws: Unhandled exceptions from SocketClient #1270
Labels
enhancement
New feature or request
Priority: High
High priority to include it inside next release
⚡ websocket
Web Socket Related
Milestone
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
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.The text was updated successfully, but these errors were encountered: