Sending any message which doesn't deserialize (e.g. an app request to an admin interface websocket) will cause the connection to close.
Expected behavior
The connection stays open and ideally i get an error message back telling me what I did wrong.
Steps to reproduce
Modify any sweettest that sends websocket messages and swap out an app request for an admin request.
Any additional information
The use of futures::stream::unfold needs looking at. Any receive error will stop the stream but serialisation errors don't need to be fatal for the connection.
There should also be a test checking that this behaves correctly!
Describe the bug
Sending any message which doesn't deserialize (e.g. an app request to an admin interface websocket) will cause the connection to close.
Expected behavior
The connection stays open and ideally i get an error message back telling me what I did wrong.
Steps to reproduce
Modify any sweettest that sends websocket messages and swap out an app request for an admin request.
Any additional information
The use of
futures::stream::unfold
needs looking at. Any receive error will stop the stream but serialisation errors don't need to be fatal for the connection.There should also be a test checking that this behaves correctly!